Hello,
I would like to merge two data tables :
ID (unique) DATE COLOR STATE TYPE
165198165 09/20/1999 Blue DC SMALL
156189650 02/12/2003 Red Florida SMALL
100068741 12/01/2011 Red DC AVERAGE
210654100 08/10/2000 Blue NY BIG
DATE STATE TEMPERATURE
01/01/1998 NY 20
02/01/1998 NY 12
...
31/12/2013 NY 15
01/01/1998 DC 09
...
31/12/2013 DC 01
.....
.....
I would like to merge those tables by Date and State. I want to get something that looks like :
ID DATE COLOUR STATE TYPE TEMPERATURE
165198165 09/20/1999 Blue DC SMALL 14
156189650 02/12/2003 Red Florida SMALL 03
100068741 12/01/2011 Red DC AVERAGE 09
210654100 08/10/2000 Blue NY BIG 13
But when I do :
data tmp;
merge x1 x2;
by date state;
run;
it doesn't give a satisfying result....
Thanks
I would like to merge two data tables :
ID (unique) DATE COLOR STATE TYPE
165198165 09/20/1999 Blue DC SMALL
156189650 02/12/2003 Red Florida SMALL
100068741 12/01/2011 Red DC AVERAGE
210654100 08/10/2000 Blue NY BIG
DATE STATE TEMPERATURE
01/01/1998 NY 20
02/01/1998 NY 12
...
31/12/2013 NY 15
01/01/1998 DC 09
...
31/12/2013 DC 01
.....
.....
I would like to merge those tables by Date and State. I want to get something that looks like :
ID DATE COLOUR STATE TYPE TEMPERATURE
165198165 09/20/1999 Blue DC SMALL 14
156189650 02/12/2003 Red Florida SMALL 03
100068741 12/01/2011 Red DC AVERAGE 09
210654100 08/10/2000 Blue NY BIG 13
But when I do :
data tmp;
merge x1 x2;
by date state;
run;
it doesn't give a satisfying result....
Thanks