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

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -