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

A basic query that doesn't extract the null records?

100+
P: 133
I have a basic query to extract records not equal to form type "Standing Order." However, it doesn't extract the null record(s). I would appreciate any insight?

The following is the input data

Record Form Type
1 Null
2 Change Order Request
3 Radioactive Materials
4 Services
5 Sole Source
6 Sole Source $10,000 to $25,900
7 Sole Source $10,000 to $27,500
8 Sole Source > $25900
9 Standing Order
10 Vendor Quote

The output data is:

Record Form Type
2 Change Order Request
3 Radioactive Materials
4 Services
5 Sole Source
6 Sole Source $10,000 to $25,900
7 Sole Source $10,000 to $27,500
8 Sole Source > $25900
10 Vendor Quote

The output data should be:

Record Form Type
1 Null
2 Change Order Request
3 Radioactive Materials
4 Services
5 Sole Source
6 Sole Source $10,000 to $25,900
7 Sole Source $10,000 to $27,500
8 Sole Source > $25900
10 Vendor Quote
Jul 27 '10 #1

✓ answered by Accrj19

In the criteria box (assuming you're in query design view) try <> "Standing Order" Or Is Null

Share this Question
Share on Google+
2 Replies


Expert Mod 2.5K+
P: 2,545
Hi. Please post the SQL for your current query so we can see what you've tried so far.

If you want to return records where there is a null on the one-side of a one-to-many relationship the normal equi-join between tables will not return those records. You would need to use an inner or outer join as appropriate to do so.

-Stewart
Jul 27 '10 #2

P: 9
In the criteria box (assuming you're in query design view) try <> "Standing Order" Or Is Null
Jul 28 '10 #3

Post your reply

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