Pulling Records based on blank/nonblank criteria (1 Viewer)

rjonas

Registered User.
Local time
Today, 03:07
Joined
Sep 2, 2010
Messages
16
I keep thinking there must be an easy answer to this question but I've yet to figure it out...

I have a couple different reference files that get updated each week. Sometimes there are missing data elements, so I'd like to structure a select query to show me those records that have blank elements but I'd like the similar records to be pulled in as well, so I can make a determination as to how to populate the blank records..

See attached example: I have a client ID reference table that gets populated with forecast owner names (individuals responsible for the customer) from a couple of different sources. Sometimes there are names attached and sometimes the field is blank.

How can I structure a query to show me just those Client ID's that have multiple entries with blank AND non-blank forecast owners? I'd also like to exclude single/multiple records where there are only blank records...

Thoughts?? Thanks!!! Ron

 

Attachments

  • Example.xls
    26 KB · Views: 91
Last edited:

PaulO

Registered User.
Local time
Today, 11:07
Joined
Oct 9, 2008
Messages
421
A Select query on the data Table using the IsNull statement as the criteria on the Forecast Owner field. This will pull up just those records where Forecast Owner field is blank ...
 

SOS

Registered Lunatic
Local time
Today, 03:07
Joined
Aug 27, 2008
Messages
3,517
A bit of a reminder - fields might be NULL or an empty (zero length) string so it really depends on what is allowed in that field. If it can be either Null or an empty string, you could just create a non-showing field in your query like this:

FLen:Len([FieldNameHere] & "")

And then the criteria would simply be

0
 

rjonas

Registered User.
Local time
Today, 03:07
Joined
Sep 2, 2010
Messages
16
Thank you for your responses. I apologize that I wasn't clear in what I was looking for...

I am aware of the IsNull function and use it frequently.

In this case, I want the records where the Forecast Owner is Null (or empty) but I also want any existing records that have the same Client ID as the Null/Empty Forecast Owner, where those existing records have a Forecast Owner assigned, i.e. where a Forecast Owner already exists.

As it stands now, I have to go through ~5000 entries each time I update the table to see if a new Client ID/Project has been loaded with a blank forecast owner and where a forecast owner has already been established for an existing Client ID/project.

It's not a hugely time consuming task but it is somewhat monotonous and is prone to errors...

I just know there must be a way to construct the query to show the records the way I want but it seems just outside my grasp...
 

Users who are viewing this thread

Top Bottom