Victor
Victor

Reputation: 17107

Difference between MISSING and NULL in SAS

In SAS, while using in a WHERE clause, is there any differnece between

WHERE col1 is MISSING

vs

WHERE col1 is NULL

Can you explain citing the case when col1 is char and when col1 is numeric?

Upvotes: 8

Views: 7626

Answers (1)

Joe
Joe

Reputation: 63434

WHERE col1 is NULL and WHERE col1 is MISSING are identical: SAS translates between the two freely (the documentation refers to them as one). Both pick up character missing, numeric missing, and numeric special missings (.M etc.) fine.

See the SAS documentation for more specific information on IS NULL / IS MISSING.


Note that this is only true for SAS-side processing. If you're connected to another kind of database/data source (such as Oracle, SQL Server, etc.), these do not necessarily apply - even if you're running it in PROC SQL with a LIBNAME.

Upvotes: 6

Related Questions