- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-20-2009 11:20 PM
(2596 views)
Hi guys,
If I have a column that accept null value, how can I check whether the column is a null or is a blank(' ')?
Is there a function for it?
Thanks
Yours Sincerely,
helphelp
If I have a column that accept null value, how can I check whether the column is a null or is a blank(' ')?
Is there a function for it?
Thanks
Yours Sincerely,
helphelp
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I assume this is a char column.
In SAS, blank means MISSING (aka NULL), which is different compared to how most RDBMS work. If your data does not reside in SAS table, you could might use SQL pass-thru to accomplish this.
/Linus
In SAS, blank means MISSING (aka NULL), which is different compared to how most RDBMS work. If your data does not reside in SAS table, you could might use SQL pass-thru to accomplish this.
/Linus
Data never sleeps
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
There is also a MISSING() function in the datastep. It accepts both numeric and character variables. They syntax to check whether a variable called VAR1 has a missing value would be:
if missing(VAR1) then ...
if missing(VAR1) then ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
This documentation topic contains some useful information. Partly it depends on whether you are accessing relational database data or other data and what -exactly- NULL means in that data format.
http://support.sas.com/documentation/cdl/en/acreldb/61890/HTML/default/a001924296.htm
cynthia
This documentation topic contains some useful information. Partly it depends on whether you are accessing relational database data or other data and what -exactly- NULL means in that data format.
http://support.sas.com/documentation/cdl/en/acreldb/61890/HTML/default/a001924296.htm
cynthia