02-21-2018 10:57 AM - edited 02-21-2018 01:01 PM
How would I in a Proc SQL statement maintain this datastep: Also, I want to obtain a cartesian product so there is a deviation form datastep but it will be controlled by a where clause in the Proc SQl Code.
merge dset_1 dset_2;
by "some common variable properly sorted";
if dset_1.var1 = dset_2.var1 then do;
Somebody please help me understand this. I tried various combinations nothing worked.
02-21-2018 01:06 PM
so you'd want to do a left join between the 2 tables. Then your case statement can be something like
case when table2.var is missing then 'missing' else table2.var end