<?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: Unpivot a recird to multiple records in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unpivot-a-recird-to-multiple-records/m-p/608147#M176942</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input nameid  name $ sportsPlayed :$50.;
cards;
1 sam cricket|football|badminton
2 ravi cricket|chess
run;


data want;

set have(rename=(sportsPlayed=sportsPlayed_));
length sportsPlayed $15.;
do _n_=1 to countw(sportsPlayed_,'|');
	sportsPlayed=scan(sportsPlayed_,_n_,'|');
	output;
end;

drop sportsPlayed_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 Nov 2019 00:49:58 GMT</pubDate>
    <dc:creator>r_behata</dc:creator>
    <dc:date>2019-11-29T00:49:58Z</dc:date>
    <item>
      <title>Unpivot a recird to multiple records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unpivot-a-recird-to-multiple-records/m-p/608142#M176941</link>
      <description>&lt;P&gt;Hi Guys,&lt;BR /&gt;&lt;BR /&gt;I have following datasets&lt;BR /&gt;dataset1&lt;BR /&gt;nameid &amp;nbsp; name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; sportsPlayed&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sam &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cricket|football|badminton&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ravi &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; cricket|chess&lt;BR /&gt;&lt;BR /&gt;The output sas table has to be&lt;BR /&gt;outputDATASET&lt;BR /&gt;nameid &amp;nbsp; &amp;nbsp; name &amp;nbsp; &amp;nbsp; &amp;nbsp; sportsPlayed&amp;nbsp;&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sam &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cricket&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sam &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; football&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sam &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; badminton&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ravi &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cricket&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ravi &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chess&lt;BR /&gt;&lt;BR /&gt;I tried using sort and 'by' but ...&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 00:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unpivot-a-recird-to-multiple-records/m-p/608142#M176941</guid>
      <dc:creator>Suminder</dc:creator>
      <dc:date>2019-11-29T00:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unpivot a recird to multiple records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unpivot-a-recird-to-multiple-records/m-p/608147#M176942</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input nameid  name $ sportsPlayed :$50.;
cards;
1 sam cricket|football|badminton
2 ravi cricket|chess
run;


data want;

set have(rename=(sportsPlayed=sportsPlayed_));
length sportsPlayed $15.;
do _n_=1 to countw(sportsPlayed_,'|');
	sportsPlayed=scan(sportsPlayed_,_n_,'|');
	output;
end;

drop sportsPlayed_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Nov 2019 00:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unpivot-a-recird-to-multiple-records/m-p/608147#M176942</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2019-11-29T00:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Unpivot a recird to multiple records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unpivot-a-recird-to-multiple-records/m-p/608302#M177015</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/281130"&gt;@Suminder&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Guys,&lt;BR /&gt;&lt;BR /&gt;I have following datasets&lt;BR /&gt;dataset1&lt;BR /&gt;nameid &amp;nbsp; name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; sportsPlayed&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sam &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cricket|football|badminton&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ravi &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; cricket|chess&lt;BR /&gt;&lt;BR /&gt;The output sas table has to be&lt;BR /&gt;outputDATASET&lt;BR /&gt;nameid &amp;nbsp; &amp;nbsp; name &amp;nbsp; &amp;nbsp; &amp;nbsp; sportsPlayed&amp;nbsp;&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sam &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cricket&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sam &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; football&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sam &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; badminton&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ravi &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cricket&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ravi &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chess&lt;BR /&gt;&lt;BR /&gt;I tried using sort and 'by' but ...&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So why did you ask how to put them in that hard to use format in the first place in this topic&amp;nbsp; &lt;A href="https://communities.sas.com/t5/SAS-Programming/Pivot-multiple-values-of-same-column-into-one-column-based-on/m-p/607488#M176625" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Pivot-multiple-values-of-same-column-into-one-column-based-on/m-p/607488#M176625&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 17:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unpivot-a-recird-to-multiple-records/m-p/608302#M177015</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-29T17:20:52Z</dc:date>
    </item>
  </channel>
</rss>

