Date: Thu, 29 Sep 2005 20:52:36 -0400
Reply-To: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject: Re: find maxium alphabet
Content-Type: text/plain; charset="iso-8859-1"
I assume that you are looking for the highest alphabetic character in collating sequence in a set of alphabetic characters. While the MAX(var1,var2,...) function requires numeric type arguments, the MAX() summary function in SQL doesn't. If you substitute ch="A"; output; ... for assignments of alphabetic characters to column variables, you will be able to write
select max(ch) as F from test;
Alternatives include using a function to covert alphabetic characters to numbers that represent their position in a collating sequence. The max of the position numbers will then convert back to the highest alphabetic character in the collating sequence.
From: email@example.com on behalf of eric
Sent: Thu 9/29/2005 7:53 PM
Subject: find maxium alphabet
I am just wondering if there is clean solution for finding
largest alphabet by alphabetic order.
for an example I have " ","A","B","C","D". I would like to pick "D".
What I thougt was, but Max function doesn't apply here.
Thank you for any input on this,