Hello,
I have a query that I want to return a list of contacts that do not have any rows with a 't' in the Licenced column in a one-many table. I have checked that this case does occur, but my SQL returns 0 contacts. If anyone could point me in the right direction I would appreciate it.
Thanks,
I have a query that I want to return a list of contacts that do not have any rows with a 't' in the Licenced column in a one-many table. I have checked that this case does occur, but my SQL returns 0 contacts. If anyone could point me in the right direction I would appreciate it.
Code:
SELECT COUNT(Distinct sysdba.CONTACT.CONTACTID) AS Expr1
FROM sysdba.CONTACT LEFT OUTER JOIN
sysdba.C_LICENSE ON sysdba.CONTACT.CONTACTID = sysdba.C_LICENSE.CONTACTID
WHERE (sysdba.C_LICENSE.CONTACTID NOT IN
(SELECT sysdba.C_License.contactid
FROM sysdba.C_License
WHERE sysdba.C_LICENSE.LICENSED = 'T'))
Thanks,