Hi:
This document "Potential Result Set Differences between Relational DBMSs and the SAS System" may help you understand exactly what you're dealing with. Particularly the section entitled: "RDBMS Null Values Versus SAS Missing Values". Here's the link:
http://support.sas.com/resources/papers/resultsets.pdf
The syntax, IS MISSING, IS NOT MISSING, IS NULL, IS NOT NULL, will work with SAS data sets and will return the same results. The nice thing about this syntax is that you don't have to worry about the type of the variable in order to code the expression. The other way to code for missing or not missing is:
[pre]
where numvar = .;
where numvar ne .;
where charvar = ' ';
where charvar ne ' ';
[/pre]
It would be an error to try this:
[pre]
where numvar = '.';
[/pre]
because SQL wants NUMVAR to be of the same type as what it is being compared to. If you try to code as shown above, you will get this error message (or one like it):
[pre]
ERROR: Expression using equals (=) has components that are of different data types.
[/pre]
This is how things work with SAS data sets. As the above paper explains, if you are accessing data in an RDBMS or another type of data source (not SAS), then NULL in the RDBMS might not be the same as MISSING or NULL to a SAS data set.
cynthia