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
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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