Selasa, 05 November 2013

[MS_AccessPros] Query Does Not Return Any Results

 

Hello,

 

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.[Job Code])="000496") 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



The information contained in this communication, including attachments, is confidential and private and intended only for the use of the addressees. Unauthorized use, disclosure, distribution or copying is strictly prohibited and may be unlawful. If you received this communication in error, please inform us of the erroneous delivery by return e-mail message from your computer. Additionally, although all attachments have been scanned at the source for viruses, the recipient should check any attachments for the presence of viruses before opening. Alegent Creighton Health accepts no liability for any damage caused by any virus transmitted by this e-mail. Thank you for your cooperation.

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

__,_._,___

Tidak ada komentar:

Posting Komentar