Toad World® Forums

Toad Data Point - TDP Queries Generation is differs from MS ACCESS.


#1

When i tried to replicate the MS Access Query in Toad Data point, The result were different . After debugging more, the automated query generated from Access is different in Toad Data Point, but the condition which i have used in Access and Toad data point are exact same. I have used the same tables and records in both the tool. Attached the queries and screenshot.

How can i replicate the same visual query (Query builder query) which is in Access to the Toad data Point?

Access automated query when developing the query visually in Query builder:

SELECT EMPL.EMP_ID, EMPL.EMP_NM, TEAM.ID, TEAM.TEAM_NAME, TEAM.LOC

FROM EMPL INNER JOIN TEAM ON EMPL.TEAM_ID = TEAM.ID

WHERE (((EMPL.EMP_ID)=8000) AND ((TEAM.ID)=1)) OR (((EMPL.EMP_ID)=8001) AND ((TEAM.LOC)=“BANG”));

Toad Automated generated Query :

SELECT EMPL.EMP_ID,

EMPL.EMP_NM,

TEAM.TEAM_ID,

TEAM.TEAM_NAME,

TEAM.LOC

FROM NCOR_DBO.EMPL EMPL

INNER JOIN NCOR_DBO.TEAM TEAM ON (EMPL.TEAM_ID = TEAM.TEAM_ID)

WHERE ((EMPL.EMP_ID = 8000) OR (EMPL.EMP_ID = 8001))

AND (TEAM.TEAM_ID = 1)

OR (TEAM.LOC = ‘BANG’)


#2

The difference is in your WHERE clause: the grouping of conditions in parentheses is not the same.


#3

The grouping of conditions is being automatically generated when we are building in Query builder. I have used the same condition in both the Access and TDP. Could you elaborate more on this… Is toad generate the automatic query vertically on each column.


#4

Now Toad generates the automatic query vertically on each column.