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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null values

Status
Not open for further replies.

VictoryHighway

Technical User
Mar 4, 2004
115
US
Hello,
I need to generate a SQL query on a table that I need to have a Like "*" for each field. However, this doesn't work if the field is null. Is there a way around this?

Thanks in advance,

Geoffrey
 
Code:
(fld LIKE '*' OR fld IS NULL)
but note that LIKE '*' matches everything but NULL so the above is equivalent to "all values" which is what you would get with no selection criteria at all.
 
Golom,
Basically I just wanted that to be a "placeholder", so that that could be easily replaced by some VBA code if necessary. That seems to work.

Thanks,
Geoffrey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top