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