Date: Wed, 27 May 2009 13:59:59 -0700
Reply-To: jn mao <jn_mao@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: jn mao <jn_mao@YAHOO.COM>
Subject: how to output unique ID from dulplicate ID dataset and merge it
back to unique dataset.
Content-Type: text/plain; charset=iso-8859-1
I have two datasets. Data1 has IDb and Var1. Data2 has IDa, IDb and Var2. IDb is a unique ID in data1 but is duplicated in Data2. IDa is unique is data2.
How could I merge data1and data2 to have unique IDa and both variables.
IDa IDb Var2
1 1 a
2 1 a
3 2 b
IDb Var1 Var2
1 12 a
2 15 b
Can someone help me out?