proc sql;
create table want as
select date, dea (dec.id=tap.id) as indic,
(dec.id ~=".") as decid,
(tap.id ~=".") as tapid,
coalesce (dec.id, tap.id) as id
from dec full join tap on dec.id=tap.id;
quit; I have two datasets that I want to merge. dataset dec has 240000 obs, dataset tap has 14000 obs. They do have 13000 in common. I want to merge these two. My above code can generate a table, but cannot keep all these columns that I need. I can keep all columns and all obs, that is 24000. I have 40 varibles, that I prefer to keep 15 variables of these 40 from dataset tap , and want to keep 5 varibles from dec. So it is not wise to type. Among them, some IDs are common. Can anybody give advice? Thanks.
... View more