<?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: Returning Right/left side  # of characters from column in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66186#M6648</link>
    <description>Here are a couple of examples, one using SUBSTR and LENGTH functions, and the second approach using SUBSTR with REVERSE.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
retain x 'aaabbb  ';&lt;BR /&gt;
y = substr(x,length(x)-2,3);&lt;BR /&gt;
z = reverse(substr(reverse(trim(x)),1,3));&lt;BR /&gt;
putlog _all_;&lt;BR /&gt;
run;</description>
    <pubDate>Wed, 17 Dec 2008 14:20:28 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2008-12-17T14:20:28Z</dc:date>
    <item>
      <title>Returning Right/left side  # of characters from column</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66182#M6644</link>
      <description>In excel is a feature to extract a requested number of characters (left or right) of a column into a new column.  &lt;BR /&gt;
ie, if column a1 had 9009125439&lt;BR /&gt;
the formula would look like &lt;BR /&gt;
=right(a1,5)&lt;BR /&gt;
which would give a result of 25439.&lt;BR /&gt;
according to what I saw the RIGHT/LEFT function in eg only realigns the column.&lt;BR /&gt;
I need to know how/if the right/left excel function can be done in eg.  Thanks</description>
      <pubDate>Tue, 16 Dec 2008 14:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66182#M6644</guid>
      <dc:creator>Lando_Griffen</dc:creator>
      <dc:date>2008-12-16T14:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Right/left side  # of characters from column</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66183#M6645</link>
      <description>try substr()</description>
      <pubDate>Tue, 16 Dec 2008 19:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66183#M6645</guid>
      <dc:creator>DerekAdams</dc:creator>
      <dc:date>2008-12-16T19:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Right/left side  # of characters from column</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66184#M6646</link>
      <description>Also investigate SUBSTR with the PUT function. If your variable is CHARACTER, then you won't need the PUT function. If your variable is numeric, and large, then you might want to use an explicit PUT function so you can control how the number is converted from numeric to character. SUBSTR only works on character variables.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 16 Dec 2008 21:25:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66184#M6646</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-16T21:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Right/left side  # of characters from column</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66185#M6647</link>
      <description>Thanks.  You can probably tell I'm new at this.  I appreciate your help.</description>
      <pubDate>Wed, 17 Dec 2008 13:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66185#M6647</guid>
      <dc:creator>Lando_Griffen</dc:creator>
      <dc:date>2008-12-17T13:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Returning Right/left side  # of characters from column</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66186#M6648</link>
      <description>Here are a couple of examples, one using SUBSTR and LENGTH functions, and the second approach using SUBSTR with REVERSE.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
retain x 'aaabbb  ';&lt;BR /&gt;
y = substr(x,length(x)-2,3);&lt;BR /&gt;
z = reverse(substr(reverse(trim(x)),1,3));&lt;BR /&gt;
putlog _all_;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 17 Dec 2008 14:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Returning-Right-left-side-of-characters-from-column/m-p/66186#M6648</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-12-17T14:20:28Z</dc:date>
    </item>
  </channel>
</rss>

