Date: Wed, 5 Dec 2001 10:14:59 -0700
Reply-To: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject: Re: PROC SORT
Content-Type: text/plain; charset=iso-8859-1
| 4 private Lives |
| |
+----------------------
-----------------------+
Looks like the simplest way to provide "case-insensitive" sorting !
regards
Peter Crawford
Datum: 01/10/2001 09:40
An: SAS-L@LISTSERV.UGA.EDU
Antwort an: "Karsten M. Self" <kmself@IX.NETCOM.COM>
Betreff: Sort w/ folded case (was Re: PROC SORT)
Nachrichtentext:
on Mon, Oct 01, 2001 at 01:01:59AM -0700, ninon (ndavi@AUFEMININ.COM)
wrote:
> Hi,
>
> I want to sort a data set with small letter and capital letter
> like :
>
> Before the sort the data set is :
>
> Paris
> London
> Bruxelle
> france
> belgique
>
> After the sort the data set is :
>
> belgique
> Bruxelle
> francReceived: from SLCDOM-MTA by SLCM02.firsthealth.com
e
> London
> Paris
>
> with a PROC SORT how I do it ?
> THANKS
> NINON
I'd pick SQL instead:
proc sql;
create table mydata as
select *
from mydata
order by (upcase( city ))
;
quit;
SQL allows you to sort by a condition or result which isn't itself a
field/column in the input table/dataset. Very handy, that.
You could substitute 'lowcase' for 'upcase' in the above, so long as
the
conversion is consistent.
Note that for the purposes of merging or joining the data, the dataset
isn't strictly sorted.
Peace.
--
Karsten M. Self <kmself@ix.netcom.com>
--
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
--
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.