I have a ringing situation, because I created a column with case when, but after run it shows that all fields are empty, but if I create a query with one of the conditions, it shows the results. The same in Excel, when it will generate a SAS file, it shows that there are empty fields, but when I created a pivot table, it shows me the results. What could it be caused by ?
My code :
proc sql;
create table kredyty as
select *,
case
when (DEF_PREV_MONTH) = '0' and (spr_DEFAULT) = '1' then '1'
when (DEF_PREV_MONTH) = '1' and (spr_DEFAULT) = '1' then '0'
end as NEW_DEFAULT
from kredyty as a
left join (select spr_NRB, DEF_PREV_MONTH from NewDef) as b on a.spr_NRB = b.spr_NRB
;
quit;
... View more