LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 11 Oct 2004 15:29:19 -0400
Reply-To:     "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Subject:      SQL keep first obs in each group

Hi,

Is there any way to keep the first obs in each group in sql. I am looking for an sql way of doing below. Thank you.

Cheers, Chang

proc sort data=sashelp.class out=sorted; by sex name; run;

data firstObs; set sorted; by sex name; if first.sex; run;


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