<?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 Concat Rows? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Rows/m-p/828494#M41243</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am wanting to take a table in SAS to go from looking like this:&lt;/P&gt;
&lt;TABLE width="154px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="57px"&gt;Group_Num&lt;/TD&gt;
&lt;TD width="56.3352px" height="57px"&gt;Name (Char)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;bob&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;sally&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;chris&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;molly&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;sam&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;bobby&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;beth&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;collin&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;sam&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To looking like this&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="156px" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="98.1534px" height="20" style="height: 15.0pt; width: 48pt;"&gt;Group_Num&lt;/TD&gt;
&lt;TD width="57.8551px" style="width: 48pt;"&gt;Name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="98.1534px" height="20" align="right" style="height: 15.0pt;"&gt;1&lt;/TD&gt;
&lt;TD width="57.8551px"&gt;bob, sally, chris, molly, sam&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="98.1534px" height="20" align="right" style="height: 15.0pt;"&gt;2&lt;/TD&gt;
&lt;TD width="57.8551px"&gt;bobby, beth, collin, sam&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice on how to do this? I know concat is for when you do this to columns in one row. But I was unsure of how else to refer to this. Thanks in advanced for any help.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2022 18:23:09 GMT</pubDate>
    <dc:creator>ccaudillo100</dc:creator>
    <dc:date>2022-08-12T18:23:09Z</dc:date>
    <item>
      <title>Concat Rows?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Rows/m-p/828494#M41243</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am wanting to take a table in SAS to go from looking like this:&lt;/P&gt;
&lt;TABLE width="154px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="57px"&gt;Group_Num&lt;/TD&gt;
&lt;TD width="56.3352px" height="57px"&gt;Name (Char)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;bob&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;sally&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;chris&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;molly&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;sam&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;bobby&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;beth&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;collin&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="98.1534px" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="56.3352px" height="30px"&gt;sam&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To looking like this&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="156px" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="98.1534px" height="20" style="height: 15.0pt; width: 48pt;"&gt;Group_Num&lt;/TD&gt;
&lt;TD width="57.8551px" style="width: 48pt;"&gt;Name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="98.1534px" height="20" align="right" style="height: 15.0pt;"&gt;1&lt;/TD&gt;
&lt;TD width="57.8551px"&gt;bob, sally, chris, molly, sam&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="98.1534px" height="20" align="right" style="height: 15.0pt;"&gt;2&lt;/TD&gt;
&lt;TD width="57.8551px"&gt;bobby, beth, collin, sam&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice on how to do this? I know concat is for when you do this to columns in one row. But I was unsure of how else to refer to this. Thanks in advanced for any help.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 18:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Rows/m-p/828494#M41243</guid>
      <dc:creator>ccaudillo100</dc:creator>
      <dc:date>2022-08-12T18:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Rows?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Rows/m-p/828503#M41244</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Group_Num Name $;
datalines;
1 bob   
1 sally 
1 chris 
1 molly 
1 sam   
2 bobby 
2 beth  
2 collin
2 sam   
;

data want;
   set have(rename = name = n);
   by Group_Num;
   length name $200;
   name = catx(', ', name, n);
   if last.Group_Num;
   retain name;
   drop n;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Aug 2022 19:35:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Rows/m-p/828503#M41244</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-08-12T19:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Concat Rows?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Rows/m-p/828522#M41245</link>
      <description>&lt;P&gt;This ended up sending it into repeating the same combination of lines over and over again for each Group_Num. I found this code that was able to run it correctly. From:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Concatenating-a-column-based-on-another-column/td-p/388776" target="_blank"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/Concatenating-a-column-based-on-another-column/td-p/388776&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;data want;
 length want $ 2000;
 do until(last.Shopper_ID);
  set have;
  by Shopper_ID ;
  want=catx(',',want,items);
 end;
 drop items;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 20:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Concat-Rows/m-p/828522#M41245</guid>
      <dc:creator>ccaudillo100</dc:creator>
      <dc:date>2022-08-12T20:58:51Z</dc:date>
    </item>
  </channel>
</rss>

