I have created a new table out of two datasets using left join. However since some of the format is incorrect in dataset 2, there are some missing values in the joined new table. I know which values to add but I am stuck on the syntax. How do I add on to the missing values in this code? Do I make a seperate proc sql? or do I use if/else statements? If it is something like if/else, where would I put them? If it is a different concept, please let me know. Feel free to use the sample code from my work below or simplify it to whatever you would use. Thank you!
proc sql;
create table final as
select L.*, R.*
from A as L
left join B as R
on (substr(L.One, length(L.One)-1)=substr(R.Two,length(R.Two)-1)
and substr(L.State, length(L.State)-1)) ;
quit;
proc print data = final;
run;