LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 21 Mar 2002 09:56:46 -0800
Reply-To:     MNess@CROMEDICA.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Matthew Ness <MNess@CROMEDICA.COM>
Subject:      Re: over count
Content-type: text/plain; charset=us-ascii

I'm not quite sure if I understand your question correctly...do you mean that each of the input datasets has a variable of the same name (that is not part of the 'by' group), causing one to overwrite the other? If this is the case you can rename one or both of the variables before the merge (or drop one).

data output; merge input1 (rename=(var=var1)) input2 (rename=(var=var2)); by key; run;

HTH, Matt

vicctw <vicctw@HOTMAI To: SAS-L@LISTSERV.UGA.EDU L.COM> cc: Sent by: Subject: over count "SAS(r) Discussion" <SAS-L@LISTSER V.UGA.EDU>

21/03/02 09:39 AM Please respond to vicctw

When I merge two datasets, it is often to have duplicated variables. Is there any way to avoid this situation?


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