473,395 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1197
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

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

Similar topics

4
by: Orion | last post by:
Hi, This is kind of last minute, I have a day and a half left to figure this out. I'm working on a project using ms-sqlserver. We are creating a ticket sales system, as part of the system, I...
1
by: Carl B Davis | last post by:
Help please!!! I am an intermediate access user that is getting my bottom kicked by what seems an easy problem to fix. I maintain an employee database at work. I have set up a query from two tables...
19
by: bdt513 | last post by:
I am trying to extract the values from a query using VBA. Specifically, I want to concatenate all the values of the "rosEmail" field from query "qselRosterEmailList" into one string (strEmails). I...
9
by: David Horowitz | last post by:
Hi. I have a query named Query1. Let's say it looks like this: Select * from Table1 where Field1= So whenever you run the query, it prompts for "Enter Value". So now, I have Report1, whose...
9
by: Kelii | last post by:
I've been trying to get this piece to work for a few hours, but have given up. I hope someone out there can help, I think the issue is relatively straightforward, but being a novice, I'm stumped....
2
by: Bouzy | last post by:
I have been trying to make some very basic forms. Everything I think should work once I get it on my server, but it looks like crap. I know you are supposed to use tables for an easy way to position....
2
by: Nick | last post by:
Hi, I have two tables Trade table and Cons table. Records are inserted in both the tables independent of each other. There are fields like Exc_Ref, Qty, Date in both the tables. I need to...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
9
by: Sinner | last post by:
Hi, I have a field name 'USER' in tableMAIN. How do I replace the user names with corresponding user names. I can do that in xl using vlookup but now I'm trying to find a way to do that in...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.