<?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: how to trim to column and concatenate in PROC SQL? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217342#M307815</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks much...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2015 23:05:44 GMT</pubDate>
    <dc:creator>devnand</dc:creator>
    <dc:date>2015-05-19T23:05:44Z</dc:date>
    <item>
      <title>how to trim to column and concatenate in PROC SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217338#M307811</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;&amp;nbsp; CREATE TABLE work.test&lt;/P&gt;&lt;P&gt;&amp;nbsp; AS SELECT DISTINCT TRIM(acct_ID) || "&amp;nbsp; " || TRIM(acct_num) AS CUST_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM work.test_account&lt;/P&gt;&lt;P&gt;&amp;nbsp; ORDER BY &lt;SPAN style="font-size: 13.3333330154419px;"&gt;CUST_ID&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically i am trying to trim the account_id and account num and concatenate with a space in between them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do it through PROC sql? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 21:04:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217338#M307811</guid>
      <dc:creator>devnand</dc:creator>
      <dc:date>2015-05-19T21:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to trim to column and concatenate in PROC SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217339#M307812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards dsd dlm=',';&lt;/P&gt;&lt;P&gt;input one two;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;500,600&lt;/P&gt;&lt;P&gt;200,100&lt;/P&gt;&lt;P&gt;;&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;create table want as&lt;/P&gt;&lt;P&gt;select distinct *, cat(one,' ',two) as cust_id&lt;/P&gt;&lt;P&gt;from have;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 21:20:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217339#M307812</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-05-19T21:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to trim to column and concatenate in PROC SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217340#M307813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it's all characters try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards dsd dlm=',';&lt;/P&gt;&lt;P&gt;input one $ two $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;500&amp;nbsp; ,&amp;nbsp; 600&lt;/P&gt;&lt;P&gt;200&amp;nbsp; ,&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;;&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;create table want as&lt;/P&gt;&lt;P&gt;select distinct *, cat(strip(one),' ',strip(two)) as cust_id&lt;/P&gt;&lt;P&gt;from have;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 21:22:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217340#M307813</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-05-19T21:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to trim to column and concatenate in PROC SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217341#M307814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;PROC SQL;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; CREATE TABLE work.test&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; AS SELECT catx(' ',&amp;nbsp; DISTINCT acct_ID,acct_num) AS CUST_ID&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; FROM work.test_account&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; ORDER BY &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;CUST_ID&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; QUIT;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 22:26:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217341#M307814</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2015-05-19T22:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to trim to column and concatenate in PROC SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217342#M307815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks much...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 23:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-trim-to-column-and-concatenate-in-PROC-SQL/m-p/217342#M307815</guid>
      <dc:creator>devnand</dc:creator>
      <dc:date>2015-05-19T23:05:44Z</dc:date>
    </item>
  </channel>
</rss>

