Query not picking up NULLS

kbreiss

Registered User.
Local time
Today, 16:35
Joined
Oct 1, 2002
Messages
228
The following query is not returning records that are NULL in the Sanction field. If I take out the (NOT LIKE 'DELETE*') it returns all records even the the ones that are NULL in the Sanction field.

Why is this query not returning records that are NULL in the sanction field? I want to include all records that are not like delete only...I don't care if they are null....

SELECT DL
FROM DIGITAL
WHERE SANCTION Not Like "DELETE*";


Thanks in advance,
Kacy
________
Paxil help
 
Last edited:
Yes..I know this will work, but I am more curious than anything on when using this criteria it doesn't pick up the nulls?
________
Mary Jane
 
Last edited:
WHERE SANCTION Not Like "DELETE*";

returns the records with null SANCTION because a null is not like DELETE* - which is exactly what you asked for. THAT'S why it returns records holding nulls...
 
returns the records with null SANCTION because a null is not like DELETE....

thats the problem...it does NOT return records with a null SANCTION. Why is this?
________
Asian Webcam
 
Last edited:
Null is not "Like" anything, nor is it unlike anything. I'd describe it as unknown, and it doesn't react well to tests with =, <>, etc. You have to do what Rich recommended.
 

Users who are viewing this thread

Back
Top Bottom