|
Maand
SQL is probably the easiest way to tackle your request.
proc sql;
create table dataset3 as
select a.id,
a.var1,
a.var2,
a.var3
from dataset1 a,
dataset2 b
where a.id = b.id
;
quit;
Hope this gets you underway.
Philip
Maand M
<maand_n_dune@YAH To: SAS-L@LISTSERV.UGA.EDU
OO.COM> cc:
Sent by: "SAS(r) Subject: Picking Common records
Discussion"
<SAS-L@LISTSERV.U
GA.EDU>
09/02/2004 03:46
PM
Please respond to
Maand M
Hi,
I have different datasets from which I need to pick common records (ie on
common ID variable)
The Data set looks something like this
Dataset a
id var1 var2 var3
10 a 4 6
12 t 5 9
14 p 1 0
16 h 5 8
17 u 12 6
Dataset b
id var1 var2 var3
9 a 5 16
11 f 12 8
14 p 1 0
16 h 5 8
21 d 9 9
so the common records will be
id var1 var2 var3
14 p 1 0
16 h 5 8
Can someone please help me
Thanks
Maand
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
|