<?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: grouping on substring in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/grouping-on-substring/m-p/363750#M23871</link>
    <description>&lt;P&gt;perfect, thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2017 10:41:49 GMT</pubDate>
    <dc:creator>jackthecat</dc:creator>
    <dc:date>2017-06-02T10:41:49Z</dc:date>
    <item>
      <title>grouping on substring</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/grouping-on-substring/m-p/363746#M23869</link>
      <description>&lt;P&gt;Hi all, my second question...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the query wizard to query data rather then command line type programming.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm afraid I don't know what SAS EG version it is... it's not on my PC, it is a remote instance that I access via an online method. It is quite a restrictive set up, but it's the only way I can access this data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the fields I want to include in my query is populated with a 5 char string (for example AA123, AA124, AA125 etc). However, if I pull it in as is, the query result is way too big, and all I actually need is the first two characters of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In sql it would be&lt;/P&gt;&lt;P&gt;select substring(Hcode,1,2) as H_summary... if that clarifies?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't work out how to do it though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help gratefully received.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 10:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/grouping-on-substring/m-p/363746#M23869</guid>
      <dc:creator>jackthecat</dc:creator>
      <dc:date>2017-06-02T10:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: grouping on substring</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/grouping-on-substring/m-p/363749#M23870</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just use the query builder in SAS Enterprise Guide and add a computed column like below, then you can add other columns and use summarization functions on it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9199i2BC06AE20DAF4F34/image-size/original?v=1.0&amp;amp;px=-1" alt="Snap3.png" title="Snap3.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The expression for the new column would be SUBSTR(yourColumn, start, length)&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 10:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/grouping-on-substring/m-p/363749#M23870</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-06-02T10:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: grouping on substring</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/grouping-on-substring/m-p/363750#M23871</link>
      <description>&lt;P&gt;perfect, thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 10:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/grouping-on-substring/m-p/363750#M23871</guid>
      <dc:creator>jackthecat</dc:creator>
      <dc:date>2017-06-02T10:41:49Z</dc:date>
    </item>
  </channel>
</rss>

