Date: Thu, 2 Jan 2003 13:33:51 -0500
Reply-To: diskin.dennis@KENDLE.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: diskin.dennis@KENDLE.COM
Subject: Re: appending a dataset
Content-type: text/plain; charset=us-ascii
Jian,
You need to use the NODUPKEY option. NODUPLICATES only eliminates records
which are equal for all variables.
HTH
Dennis Diskin
From: "Chen, Jian" <ozz6@CDC.GOV>@LISTSERV.UGA.EDU> on 01/02/2003 01:16 PM
Please respond to "Chen, Jian" <ozz6@CDC.GOV>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
To: SAS-L@LISTSERV.UGA.EDU
cc:
Subject: appending a dataset
Dear All:
I am trying to append a small dataset to a big base dataset and delete
the
duplicate accounts. Do you have an idea why I couldn't delete the
duplicates? Do you have any other better method? Thanks in advance!
Bei
options nodate;
data one;
input x $ y;
cards;
a 12
a 34
b 45
a 35
b 75
;
run;
data two;
input x $ y;
cards;
a 23
b 35
a 34
;
run;
proc datasets library=work memtype=data;
append base=one data=two;
*modify one;
* index create x;
run;
proc sort data=one noduplicates ;
by x;
run;
proc print data=one;
run;