469,913 Members | 2,066 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

Query from two tables that looks for a missing value

Hello,
I have two tables: CltDue, Checklist

SELECT CltDue.CDClientname, CltDue.CDID
FROM CltDue
WHERE CLtdue.CDstatus = 'More Client info reqst'

shows the following:


project#1 9579
project#2 9956
project#3 9946

SELECT checklist.CDID, Checklist.page
FROM Checklist
shows the following

9579 CLS
9579 INFO
9956 IRO2
9956 SCC

I am trying to query which projects from CltDue are missing an 'INFO' page from the Checklist table.
If I try an = 'INFO' i only get results that have an INFO page. If I try <> 'INFO' I get everything else.

Thank You
Feb 12 '08 #1
2 1117
deepuv04
227 Expert 100+
Hello,
I have two tables: CltDue, Checklist

SELECT CltDue.CDClientname, CltDue.CDID
FROM CltDue
WHERE CLtdue.CDstatus = 'More Client info reqst'

shows the following:


project#1 9579
project#2 9956
project#3 9946

SELECT checklist.CDID, Checklist.page
FROM Checklist
shows the following

9579 CLS
9579 INFO
9956 IRO2
9956 SCC

I am trying to query which projects from CltDue are missing an 'INFO' page from the Checklist table.
If I try an = 'INFO' i only get results that have an INFO page. If I try <> 'INFO' I get everything else.

Thank You

hi,

try the following query ,probably will help you

SELECT distinct CltDue.CDClientname, CltDue.CDID
FROM CltDue
WHERE CltDue.cdid not in (SELECT DISTINCT CDID FROM CHECKLIST WHERE PAGE = 'INFO')


thanks
Feb 12 '08 #2
Works perfect!
Thank you for the help.
Feb 12 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Orion | last post: by
1 post views Thread by Carl B Davis | last post: by
2 posts views Thread by Bouzy | last post: by
2 posts views Thread by Nick | last post: by
9 posts views Thread by Sinner | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.