Date: Mon, 2 Mar 2009 22:43:59 +0530
Reply-To: Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Subject: Re: Difference between PROC SORT NODUPKEY and PROC SQL?
Content-Type: text/plain; charset=ISO-8859-1
> So for a homework we asked them to get rid of duplicate ids. Problem is
> that SQL and PROC SORT don't produce the same results and I would like to
> tweak one or the other so they do produce same results. Otherwise will be
> quite difficult to explain to class why they get different results if they
> ran both SQL and PROC SORT, in which case I need to invite a guest lecturer.
If you want just one record per key value, shouldn't a SELECT DISTINCT
work? As others have pointed out, what you are doing in not what you
state you intend to do using a PROC SORT NODUPKEY.