<?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: adding multiple rows to multiple rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413338#M101143</link>
    <description>&lt;P&gt;like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input CustID ContactID;
datalines;
1 1
1 2
1 3
;

data two;
input CustID PlanID$;
datalines;
1 A
1 B
1 C
;

proc sql;
	create table want as
	select one.*
	      ,two.planID
	from one, two
	where one.CustID=two.CustID
	order by CustID, ContactID, planID;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Nov 2017 14:32:28 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-11-14T14:32:28Z</dc:date>
    <item>
      <title>adding multiple rows to multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413193#M101109</link>
      <description>&lt;P&gt;I have 2 files that look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CustID ContactID&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CustID PlanID&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to merge them in base SAS so I get the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CustID ContcatID PlanID&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;/P&gt;&lt;P&gt;1&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 04:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413193#M101109</guid>
      <dc:creator>granthecht</dc:creator>
      <dc:date>2017-11-14T04:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: adding multiple rows to multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413333#M101142</link>
      <description>&lt;P&gt;You might lookup Cartesian Products in SAS.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 14:23:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413333#M101142</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2017-11-14T14:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: adding multiple rows to multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413338#M101143</link>
      <description>&lt;P&gt;like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input CustID ContactID;
datalines;
1 1
1 2
1 3
;

data two;
input CustID PlanID$;
datalines;
1 A
1 B
1 C
;

proc sql;
	create table want as
	select one.*
	      ,two.planID
	from one, two
	where one.CustID=two.CustID
	order by CustID, ContactID, planID;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Nov 2017 14:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413338#M101143</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-11-14T14:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: adding multiple rows to multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413368#M101150</link>
      <description>You can also use "inner join" or "left join" clauses with proc sql</description>
      <pubDate>Tue, 14 Nov 2017 15:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/adding-multiple-rows-to-multiple-rows/m-p/413368#M101150</guid>
      <dc:creator>Yavuz</dc:creator>
      <dc:date>2017-11-14T15:16:52Z</dc:date>
    </item>
  </channel>
</rss>

