|
Stef,
NODUPKEY is like FIRST. processing. Both depend on order which is an alien
concept to SQL. SQL depends on information stored as data, not in variable
names and not in order.
If for example you had the variables GROUP and SEQ where SEQ is a sequence
number within group, then you could use a GROUP BY GROUP clause with HAVING
SEQ=1. In short there must be something in the data values that indicates
which records you want.
The suggestion to use DISTINCT works when all records having the same value
of GROUP have all other relevant variables with equal values. This would be
equivalent to the NODUP option in PROC SORT.
IanWhitlock@westat.com
-----Original Message-----
From: Stef Boreel [mailto:stef.boreel@ACHMEA.NL]
Sent: Wednesday, January 29, 2003 7:15 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Equivalent of NODUPKEY in PROQ SQL
Hello everybody,
I have a beginners question.
I succeeded in generating a subset with PROC SQL, but there still remained
dupkeys.
What I did was let it follow by a PROC SORT with a BY statement and a the
NODUPKEY option.
Is there an equivalent in PROC SQL which does the same job?
I studied the OnlineDoc thoroughly but could not find the SQL solution to
my question.
Thank you in advance,
Stef
********************* DISCLAIMER *********************
De informatie in dit e-mail bericht is uitsluitend
bestemd voor de geadresseerde. Verstrekking aan
en gebruik door anderen is niet toegestaan.
Door de electronische verzending van het bericht
kunnen er geen rechten worden ontleend aan de
informatie.
************************************************************
|