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’)