SAS Procedures

Help using Base SAS procedures
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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