<?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: Merging Two Data Sets - Set 1's values at every value of Set 2 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-Data-Sets-Set-1-s-values-at-every-value-of-Set-2/m-p/62599#M13635</link>
    <description>Answer: Yes and too many ways to describe here.  The one with the least amount of coding is probably:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data have1;&lt;BR /&gt;
  input Year;&lt;BR /&gt;
  cards;&lt;BR /&gt;
2000&lt;BR /&gt;
2001&lt;BR /&gt;
2002&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
data have2;&lt;BR /&gt;
  input Party $;&lt;BR /&gt;
  cards;&lt;BR /&gt;
Dem&lt;BR /&gt;
Repub&lt;BR /&gt;
Green&lt;BR /&gt;
Other&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
  create table want as&lt;BR /&gt;
    select *&lt;BR /&gt;
	  from have1, have2&lt;BR /&gt;
;&lt;BR /&gt;
quit;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
HTH,&lt;BR /&gt;
Art&lt;BR /&gt;
--------&lt;BR /&gt;
&amp;gt; Hey all, hoping you can help me out with this&lt;BR /&gt;
&amp;gt; question, which has cooked my brain a bit. Lets say I&lt;BR /&gt;
&amp;gt; have two data sets, "Year" and "Party"&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Year:&lt;BR /&gt;
&amp;gt; 2000&lt;BR /&gt;
&amp;gt; 2001&lt;BR /&gt;
&amp;gt; 2002&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Party:&lt;BR /&gt;
&amp;gt; Dem&lt;BR /&gt;
&amp;gt; Repub&lt;BR /&gt;
&amp;gt; Green&lt;BR /&gt;
&amp;gt; Other&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; What I'm trying to do is make a new data set,&lt;BR /&gt;
&amp;gt; "Merge", that ends up with the following&lt;BR /&gt;
&amp;gt; 2000 Dem&lt;BR /&gt;
&amp;gt; 2000 Repub&lt;BR /&gt;
&amp;gt; 2000 Green&lt;BR /&gt;
&amp;gt; 2000 Other&lt;BR /&gt;
&amp;gt; 2001 Dem&lt;BR /&gt;
&amp;gt; 2001 Repub&lt;BR /&gt;
&amp;gt; 2001 Green&lt;BR /&gt;
&amp;gt; etc.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Is this possible to do via SAS?</description>
    <pubDate>Thu, 05 May 2011 22:34:37 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-05-05T22:34:37Z</dc:date>
    <item>
      <title>Merging Two Data Sets - Set 1's values at every value of Set 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-Data-Sets-Set-1-s-values-at-every-value-of-Set-2/m-p/62598#M13634</link>
      <description>Hey all, hoping you can help me out with this question, which has cooked my brain a bit. Lets say I have two data sets, "Year" and "Party"&lt;BR /&gt;
&lt;BR /&gt;
Year:&lt;BR /&gt;
2000&lt;BR /&gt;
2001&lt;BR /&gt;
2002&lt;BR /&gt;
&lt;BR /&gt;
Party:&lt;BR /&gt;
Dem&lt;BR /&gt;
Repub&lt;BR /&gt;
Green&lt;BR /&gt;
Other&lt;BR /&gt;
&lt;BR /&gt;
What I'm trying to do is make a new data set, "Merge", that ends up with the following&lt;BR /&gt;
2000 Dem&lt;BR /&gt;
2000 Repub&lt;BR /&gt;
2000 Green&lt;BR /&gt;
2000 Other&lt;BR /&gt;
2001 Dem&lt;BR /&gt;
2001 Repub&lt;BR /&gt;
2001 Green&lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Is this possible to do via SAS?</description>
      <pubDate>Thu, 05 May 2011 22:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Two-Data-Sets-Set-1-s-values-at-every-value-of-Set-2/m-p/62598#M13634</guid>
      <dc:creator>epigrad</dc:creator>
      <dc:date>2011-05-05T22:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Two Data Sets - Set 1's values at every value of Set 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Two-Data-Sets-Set-1-s-values-at-every-value-of-Set-2/m-p/62599#M13635</link>
      <description>Answer: Yes and too many ways to describe here.  The one with the least amount of coding is probably:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data have1;&lt;BR /&gt;
  input Year;&lt;BR /&gt;
  cards;&lt;BR /&gt;
2000&lt;BR /&gt;
2001&lt;BR /&gt;
2002&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
data have2;&lt;BR /&gt;
  input Party $;&lt;BR /&gt;
  cards;&lt;BR /&gt;
Dem&lt;BR /&gt;
Repub&lt;BR /&gt;
Green&lt;BR /&gt;
Other&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
  create table want as&lt;BR /&gt;
    select *&lt;BR /&gt;
	  from have1, have2&lt;BR /&gt;
;&lt;BR /&gt;
quit;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
HTH,&lt;BR /&gt;
Art&lt;BR /&gt;
--------&lt;BR /&gt;
&amp;gt; Hey all, hoping you can help me out with this&lt;BR /&gt;
&amp;gt; question, which has cooked my brain a bit. Lets say I&lt;BR /&gt;
&amp;gt; have two data sets, "Year" and "Party"&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Year:&lt;BR /&gt;
&amp;gt; 2000&lt;BR /&gt;
&amp;gt; 2001&lt;BR /&gt;
&amp;gt; 2002&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Party:&lt;BR /&gt;
&amp;gt; Dem&lt;BR /&gt;
&amp;gt; Repub&lt;BR /&gt;
&amp;gt; Green&lt;BR /&gt;
&amp;gt; Other&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; What I'm trying to do is make a new data set,&lt;BR /&gt;
&amp;gt; "Merge", that ends up with the following&lt;BR /&gt;
&amp;gt; 2000 Dem&lt;BR /&gt;
&amp;gt; 2000 Repub&lt;BR /&gt;
&amp;gt; 2000 Green&lt;BR /&gt;
&amp;gt; 2000 Other&lt;BR /&gt;
&amp;gt; 2001 Dem&lt;BR /&gt;
&amp;gt; 2001 Repub&lt;BR /&gt;
&amp;gt; 2001 Green&lt;BR /&gt;
&amp;gt; etc.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Is this possible to do via SAS?</description>
      <pubDate>Thu, 05 May 2011 22:34:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Two-Data-Sets-Set-1-s-values-at-every-value-of-Set-2/m-p/62599#M13635</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-05-05T22:34:37Z</dc:date>
    </item>
  </channel>
</rss>

