LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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

Hello SAS-Ls,

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.

Data1 IDb   var1 1       12 2       15

Data2 IDa  IDb Var2 1      1     a 2      1     a 3      2     b

I want IDb  Var1  Var2 1      12      a 2      15      b

Can someone help me out? Thanks much!

Jane


Back to: Top of message | Previous page | Main SAS-L page