Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query blank records

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
I have a table with about 10,000 records that contain about 10 fields, i want to be able to run a query that will only show records with those 10 fields when they are empty. Can someone give me an idea of how to do this?

THanks!!!

Paul
 
ptrifile,

Something like this.

Code:
SELECT * FROM yourTable WHERE yourField1=NULL AND yourField2=NULL AND yourField3=NULL;

Use OR nstead of AND if you need to test them individualy.

This assumes there is "nothing" in them i.e. not spaces. If so the modify accordingly

I hope this helps...



 
If you want a quick method, just drag all the fields into the query, and then sort each field ascending...

Or you can an expression field for each field and check to see if the length of the field is Zero....
drag the * into a column in the query grid then add the expression fields:

for Field Name use:
Exp1: Len(Nz([ActualFieldName1],""))
and set its criteria row
= 0
Unclick the Show button for those fields.

do this for all 10 fields.

PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top