<?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 Re: sql query in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174961#M13435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, this is a better way to do that. I think notalpha(substr(name,1,1)) will be used instead of notdigit(substr(name,1,1)) to get the desired results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Oct 2014 15:04:20 GMT</pubDate>
    <dc:creator>stat_sas</dc:creator>
    <dc:date>2014-10-08T15:04:20Z</dc:date>
    <item>
      <title>sql query</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174955#M13429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to fetch variable values ,if &lt;STRONG&gt;first letter of variable value is digit&lt;/STRONG&gt; then that digit should be omitted and want to fetch values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;varible:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ram&lt;/P&gt;&lt;P&gt;lakshman&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;manhor1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1hello&lt;/P&gt;&lt;P&gt;2hai &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fetched varible:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ram&lt;/P&gt;&lt;P&gt;lakshman&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;manohar1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;hai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 15:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174955#M13429</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2014-10-07T15:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174956#M13430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want as&lt;/P&gt;&lt;P&gt;select case when input(substr(name,1,1),8.)&amp;gt;=0 then compress(name,,'ka') else name end as fetched_name&lt;/P&gt;&lt;P&gt;from have;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 15:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174956#M13430</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-07T15:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174957#M13431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this is in EG Query builder you'll need an advanced expression. &lt;/P&gt;&lt;P&gt;Substr out the first character and use the anydigit function&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this was a data step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;first_char=substr(variable, 1,1);&lt;/P&gt;&lt;P&gt;if anydigit(first_char) then fetched_variable=substr(variable, 2);&lt;/P&gt;&lt;P&gt;else fetched_variable=variable;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 15:13:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174957#M13431</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-07T15:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174958#M13432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try PRX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want as select variable, &lt;/P&gt;&lt;P&gt;case when prxmatch('/\d{1}/',variable)^=1 then variable&lt;/P&gt;&lt;P&gt;else&amp;nbsp; compress(variable,,'ka') end as variable2 from have;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 15:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174958#M13432</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2014-10-07T15:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174959#M13433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;fetched_variable=prxchange('s/^\d{1}(.)/$1/',-1,variable);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt; select prxchange('s/^\d{1}(.)/$1/',-1,variable) as fetched_variable from have;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Oct 2014 16:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174959#M13433</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2014-10-07T16:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174960#M13434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of the &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;input(substr(name,1,1),8.)&amp;gt;=0,we&amp;nbsp; can use notdigit(substr(name,1,1)) --easy to understand .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 06:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174960#M13434</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2014-10-08T06:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: sql query</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174961#M13435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, this is a better way to do that. I think notalpha(substr(name,1,1)) will be used instead of notdigit(substr(name,1,1)) to get the desired results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 15:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/sql-query/m-p/174961#M13435</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-08T15:04:20Z</dc:date>
    </item>
  </channel>
</rss>

