Selasa, 05 November 2013

[MS_AccessPros] Query Does Not Return Any Results

 

Hello,

I am using Access 2010 and here is the SQL Code for my query:

SELECT A.Employee, A.Name, A.[Job Code], A.[Lic Cert Code], A.GroupNum
FROM REQ_LIC_W_GRP_NUM_QRY AS A LEFT JOIN REQ_LIC_JOBCODE_QRY AS B ON (A.GroupNum = B.GroupNum) AND (A.[Lic Cert Code] = B.[LicCert]) AND (A.[Job Code] = B.JobCode)
WHERE (((A.Employee)="00000") AND ((Exists (Select B.GroupNum
From REQ_LIC_JOBCODE_QRY AS B, REQ_LIC_W_GRP_NUM_QRY AS A
Where B.GroupNum=A.GroupNum ))=False));
Currently it returns nothing. What I'd like it to return is:

Employee Name Job Code Lic Cert Code GroupNum
00000 Smith, Joseph E 000496 ABMS-BC 1
00000 Smith, Joseph E 000496 DEA-NE 5

If I change the condition to True in the Exists statement/subquery it returns the certifications Dr. Smith already possesses. I am looking for the two he does not (shown in table above). Is there something missing in the logic for the query or subquery?

Thank you,

Bill Beshlian

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar