Hi all,
This is the SQL that works in Jet (MS Access)
To summarise, table ARDEBTAG contains zero->many records per record in ARMASTER, one of which may have TAG_CODE='INACTIVE'. I want to return records from ARMASTER which do not have a matching record in ARDEBTAG that has TAG_CODE='INACTIVE'.
Now I have to do the same thing using the CONNX ODBC driver, which doesn't appear to support dynamic tables, even though during it's errors it appropriately summarises the inner SELECT statement as '(cnxsubquery)'. It seems that it's not properly associating the alias T with the subquery, and I've tried using AS there as well.
Presuming I can't do it that way, is there a way to do what I want in a single SQL statement without using the subquery?
Many thanks.
This is the SQL that works in Jet (MS Access)
Code:
SELECT M.CODE, M.NAME
FROM ARMASTER M LEFT JOIN (SELECT DEBTOR FROM ARDEBTAG WHERE TAG_CODE='INACTIVE') T ON M.CODE = T.DEBTOR
WHERE T.DEBTOR Is Null
To summarise, table ARDEBTAG contains zero->many records per record in ARMASTER, one of which may have TAG_CODE='INACTIVE'. I want to return records from ARMASTER which do not have a matching record in ARDEBTAG that has TAG_CODE='INACTIVE'.
Now I have to do the same thing using the CONNX ODBC driver, which doesn't appear to support dynamic tables, even though during it's errors it appropriately summarises the inner SELECT statement as '(cnxsubquery)'. It seems that it's not properly associating the alias T with the subquery, and I've tried using AS there as well.
Presuming I can't do it that way, is there a way to do what I want in a single SQL statement without using the subquery?
Many thanks.