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 (January 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 23 Jan 2006 11:09:02 -0800
Reply-To:     "Terjeson, Mark (IM&R)" <Mterjeson@RUSSELL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Terjeson, Mark (IM&R)" <Mterjeson@RUSSELL.COM>
Subject:      Re: SQL Select
Comments: To: toby dunn <tobydunn@HOTMAIL.COM>
Content-Type: text/plain; charset="us-ascii"

Hi Toby,

That would be very handy, and I have wished in the past that it was so, but the NOPRINT only yields 1 row, while without yields 4 rows.


-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of toby dunn Sent: Monday, January 23, 2006 11:05 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: SQL Select


Simple enough and we wont even create anything new:

data one; input x$ y$ @@; cards; 1 2 1 2 1 3 2 3 3 4 2 3 ; run;

proc sql noprint ; select distinct * from one ; quit ;

%put The number of different XY combinations is : &sqlobs ;

Toby Dunn

From: Michael Ni <> Reply-To: Michael Ni <> To: SAS-L@LISTSERV.UGA.EDU Subject: SQL Select


Could anyone help tell me a one-step proc sql way to find out the unique combination of x, y?

data one; input x y @@; cards; 1 2 1 2 1 3 2 3 3 4 2 3 ; run;

proc sort nodupkey; by x y; run;

proc sql; select count(x) into: n from one; quit;

%put x=&x;

Thanks a lot for your help!


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