Selasa, 05 November 2013

RE: [MS_AccessPros] RE: Query Does Not Return Any Results

 

Bill,

It does not. When I use to Not Exists statement the certifications already held are returned.

Bill Beshlian

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of wrmosca@comcast.net
Sent: Tuesday, November 05, 2013 1:45 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] RE: Query Does Not Return Any Results



Bill



Won't NOT EXISTS work for you?



Regards,

Bill Mosca, Founder - MS_Access_Professionals

http://www.thatlldoit.com

Microsoft Office Access MVP

https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E

My nothing-to-do-with-Access blog

http://wrmosca.wordpress.com






---In MS_Access_Professionals@yahoogroups.com, <william.beshlian@alegent.org> wrote:

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.


[Non-text portions of this message have been removed]

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

__,_._,___

Tidak ada komentar:

Posting Komentar