Merging data sets in sas -
suppose have dataset a:
id geogkey 1    1    b 1    c 2    w 2    r 2    s   and dataset b:
id temp date 1   95   1 1  100   2 1  105   3 2   10   1   how merge these 2 datasets 3 records each geogkeys id=1 , 1 record each geogkeys id =2?
assuming want cartesian join, best off doing in sql, if it's not big:
proc sql; create table c   select * a,b   a.id=b.id ; quit;   the select * generate warning id variables overwriting; if that's concern, explicitly spell out select (select a.id, a.geogkey, b.temp, b.date).
Comments
Post a Comment