Let's say I have two tables:
First one - columns Apple_name, Pear_name (empty, if it is apple and vice versa), Weight
Second one - columns Fruit_index, Name
So I tried:
proc sql;
create table test as
select a.*, b.fruit_index
from First_table a left join Second_table b
on a.Apple_name=b.Name and a.Pear_name=b.Name;
quit;
But it seems that just one part joined.
Intended result:
First row - Apple_name: Golden Smith, Pear_name:., Weight: 300, Fruit_index: Apple
Second row - Apple_name:., Pear_name: Gren Anjou Weight: 280, Fruit_index: Pear
Third row - Apple_name:., Pear_name:., Weight: 250, Fruit Index:.