BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
3 REPLIES 3
LinusH
Tourmaline | Level 20
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
Data never sleeps
sfleming
Calcite | Level 5
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 ...
Cynthia_sas
Diamond | Level 26
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2838 views
  • 0 likes
  • 4 in conversation