Help using Base SAS procedures

Handling missing values

Reply
Frequent Contributor
Posts: 131

Handling missing values

data want;

set have;

if step=1 then step1 =completion_dt;

if step=2 then step2=completion_dt;

if step=3 then step3=completion_dt;

run;

proc sql;

create table want1 as

select a.ln_no,

a.address,

a.city,

b.step1,

b.step2,

b.step3

from main  a

inner join  want b

on a.ln=b.ln;

quit;

Here is the issue.  If say step3 has no value then the proc sql statement fails because it is a null value.  How can I address this when the value is null however I still need to join the two datasets

Super User
Super User
Posts: 6,498

Re: Handling missing values

In the code you posted it would not matter if the variable STEP3 had a null value.

Can you post an example with some values?

Ask a Question
Discussion stats
  • 1 reply
  • 162 views
  • 0 likes
  • 2 in conversation