<?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 Proc SQL upcase in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-upcase/m-p/870565#M38541</link>
    <description>&lt;P&gt;Hi - I'm trying to mess with some name variables in proc sql and the last step is to create the name in the format J. DOE. I can figure out how to keep the last name as lowercase (J. Doe) but not how to make the last upper case. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried: upcase(last) as upcaselast in the create table, but that didn't work. Below is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table new as&lt;BR /&gt;Select first as firstname length=25,&lt;BR /&gt;last as lastname length=25,&lt;BR /&gt;strip(scan(first,1,' ') || " " || scan(last,1,' ')) as fullname length=51,&lt;BR /&gt;&lt;STRONG&gt;strip(substr(scan(first,1,' '),1,1) || ". " || scan(last,1,' ')) as filast length=28&lt;/STRONG&gt;&lt;BR /&gt;from salaries;&lt;BR /&gt;quit;&lt;BR /&gt;proc print data=new;&lt;BR /&gt;var firstname lastname fullname filast;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 14:34:21 GMT</pubDate>
    <dc:creator>hovicke</dc:creator>
    <dc:date>2023-04-19T14:34:21Z</dc:date>
    <item>
      <title>Proc SQL upcase</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-upcase/m-p/870565#M38541</link>
      <description>&lt;P&gt;Hi - I'm trying to mess with some name variables in proc sql and the last step is to create the name in the format J. DOE. I can figure out how to keep the last name as lowercase (J. Doe) but not how to make the last upper case. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried: upcase(last) as upcaselast in the create table, but that didn't work. Below is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table new as&lt;BR /&gt;Select first as firstname length=25,&lt;BR /&gt;last as lastname length=25,&lt;BR /&gt;strip(scan(first,1,' ') || " " || scan(last,1,' ')) as fullname length=51,&lt;BR /&gt;&lt;STRONG&gt;strip(substr(scan(first,1,' '),1,1) || ". " || scan(last,1,' ')) as filast length=28&lt;/STRONG&gt;&lt;BR /&gt;from salaries;&lt;BR /&gt;quit;&lt;BR /&gt;proc print data=new;&lt;BR /&gt;var firstname lastname fullname filast;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 14:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-upcase/m-p/870565#M38541</guid>
      <dc:creator>hovicke</dc:creator>
      <dc:date>2023-04-19T14:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL upcase</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-upcase/m-p/870566#M38542</link>
      <description>&lt;P&gt;You could use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;upcase(strip(substr(scan(first,1,' '),1,1) || ". " || scan(last,1,' '))) as filast length=28&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2023 14:38:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-upcase/m-p/870566#M38542</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-04-19T14:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL upcase</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-upcase/m-p/870568#M38543</link>
      <description>That should have been obvious... thanks!</description>
      <pubDate>Wed, 19 Apr 2023 14:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-SQL-upcase/m-p/870568#M38543</guid>
      <dc:creator>hovicke</dc:creator>
      <dc:date>2023-04-19T14:40:04Z</dc:date>
    </item>
  </channel>
</rss>

