My SQL knowledge is not great, but this query below worked in Access and I have not been able to get it to work with MySQL. Basically I want to pull all the rows in table1 that do not have corresponding rows in table2:
SELECT T1.USR_ID,
T1.CO_NM,
T1.FRST_NM,
T1.LST_NM
FROM DB2_USRS T1
WHERE NOT EXISTS (
SELECT ' ' FROM DB2_CLIENT_DM T2
WHERE T1.USR_ID = T2.USR_ID
)
ORDER BY T1.CO_NM, T1.LST_NM
Anything obvious that anybody can see why this would work in Access and not MySQL?
SELECT T1.USR_ID,
T1.CO_NM,
T1.FRST_NM,
T1.LST_NM
FROM DB2_USRS T1
WHERE NOT EXISTS (
SELECT ' ' FROM DB2_CLIENT_DM T2
WHERE T1.USR_ID = T2.USR_ID
)
ORDER BY T1.CO_NM, T1.LST_NM
Anything obvious that anybody can see why this would work in Access and not MySQL?