A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need null values for several fields in db



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2010, 06:51 PM posted to microsoft.public.access.queries
shahnaz
external usenet poster
 
Posts: 4
Default Need null values for several fields in db

I have an equipment inventory db. I need to run a query that would give me
the records that contain null values in several of the fields. I have run a
successful query to return records that have a null value in one field but
don't know how to combine so that query returns records that also have null
values in other fields or any other fields.

Please advise
--
dmp
  #2  
Old April 29th, 2010, 08:02 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Need null values for several fields in db

You join the seperate queries with a UNION.

SELECT * From YourTable WHERE YourField Is NULL
UNION
SELECT * From YourTable WHERE YourField2 Is NULL
UNION
SELECT * From YourTable WHERE YourField3 Is NULL ;

You can't do this from the normal query grid. Rather you probably need to do
it in the SQL view typing in something like above.

One big point he If you have to do things like this, there's a very good
chance that your data isn't properly normalized and your tables set up less
than optimum.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"shahnaz" wrote:

I have an equipment inventory db. I need to run a query that would give me
the records that contain null values in several of the fields. I have run a
successful query to return records that have a null value in one field but
don't know how to combine so that query returns records that also have null
values in other fields or any other fields.

Please advise
--
dmp

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.