<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic max of character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370229#M275676</link>
    <description>&lt;P&gt;by ranking:&lt;/P&gt;&lt;P&gt;C&amp;gt;B&amp;gt;A&amp;gt;null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any proc sql code to get the max of the character?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i can get max of a numeric value, how to apply the same for character?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 24 Jun 2017 06:39:27 GMT</pubDate>
    <dc:creator>teddyee</dc:creator>
    <dc:date>2017-06-24T06:39:27Z</dc:date>
    <item>
      <title>max of character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370229#M275676</link>
      <description>&lt;P&gt;by ranking:&lt;/P&gt;&lt;P&gt;C&amp;gt;B&amp;gt;A&amp;gt;null&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any proc sql code to get the max of the character?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i can get max of a numeric value, how to apply the same for character?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 06:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370229#M275676</guid>
      <dc:creator>teddyee</dc:creator>
      <dc:date>2017-06-24T06:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: max of character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370232#M275677</link>
      <description>&lt;P&gt;You can tie each lettet to a new numeric variable with the desired ranking such that if var = 'A' then rankvar = 1;&amp;nbsp;&lt;SPAN&gt;if var = 'B' then rankvar = 2; and so on.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jun 2017 07:25:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370232#M275677</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-24T07:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: max of character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370238#M275678</link>
      <description>&lt;P&gt;That's a sad state of affairs. See &lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/create-string-summary-functions/idi-p/288035" target="_blank"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/create-string-summary-functions/idi-p/288035&lt;/A&gt; and vote.&lt;/P&gt;
&lt;P&gt;In the meantime, you can use&amp;nbsp;&amp;nbsp; &lt;FONT face="courier new,courier"&gt;MAX=byte(max(rank(VAR1),rank(VAR2)))&lt;/FONT&gt;&amp;nbsp; since you only have one letter (and if you are not on mainframe).&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2017 23:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370238#M275678</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-06-25T23:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: max of character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370255#M275679</link>
      <description>&lt;P&gt;If you want aggregate max, i.e. the max of values found in a column, you can use the MAX() function the same way you would with a numeric variable.&amp;nbsp; If you want to find the the max of values within a row, you can't use the MAX() function, but you can use the MAX operator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input x $1. @3 y $1.;
cards;
A Q
C Q
B A
;
run;

proc sql;
  select max(x) as mymax from a;
quit;

mymax
C


proc sql;
  select x max y as mymax from have;
quit;

mymax
Q
Q
B
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Jun 2017 12:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/max-of-character/m-p/370255#M275679</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-06-24T12:15:55Z</dc:date>
    </item>
  </channel>
</rss>

