Re: Equivalent of NODUPKEY in PROC SQL?

  • Follow


One option is to use SQL's GROUP BY to aggregate to the level of
uniqueness needed, and then drop the column created by an aggregate
expression of your choice.

Perhaps:
Proc sql;
create dataset2 as (select count(*) as count, var1, var2, var3 from
dataset1 group by var1 var2 var3); alter table dataset2 drop count;
quit;run;



-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Curtis E. Reid
Sent: Tuesday, December 01, 2009 10:01 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Equivalent of NODUPKEY in PROC SQL?

Hi!

What is the equivalent of NODUPKEY (PROC SORT) in PROC SQL?  Using
DISTINCT doesn't seem to do the trick well.  Thanks in advance!

Curtis E. Reid
Bureau of Labor Statistics (BLS)
0
Reply marc.weinmann.lwed (16) 12/2/2009 9:42:07 PM


0 Replies
839 Views

(page loaded in 0.064 seconds)

Similiar Articles:













7/21/2012 11:18:46 PM


Reply: