By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,480 Members | 1,231 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,480 IT Pros & Developers. It's quick & easy.

Finding unmatched queries within 2 forms' linking column

P: 13
I have 2 tables connected to each other through an "ID" column. The first table uses the ID column as the primary key so there is a value for it in every record. The second table also has an ID column, but I suspect it has records where the ID column has no value. I'd like to find out how many of the records in the 2nd table has values in the ID column. The only common link between the 2 tables is the ID column. I've tried using the unmatched query wizard, but it requires a 2nd common link between the 2 tables. Any help is appreciated!
Aug 4 '10 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 983
To find the count of empty IDs, try:

Expand|Select|Wrap|Line Numbers
  1. SELECT COUNT(*) FROM table2 WHERE id is NULL;
And to find the count of populated IDs, try:

Expand|Select|Wrap|Line Numbers
  1. SELECT COUNT(*) FROM table2 WHERE id is not NULL;
Aug 4 '10 #2

Post your reply

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