Hello
I am trying to insert data into my table using the case-when statement, however I am getting a syntax error.
Here's what I am trying to do:
proc sql;
insert into temp1 (x,y,z)
values(
case when condition 1 then a
when condition 2 then b
else c
end as x,
case when condition 3 then c
when condition 4 then d
else e
end as y,
case when condition 5 then f
when condition 6 then g
else g
end as z)
run;
Thank you.