<?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: Trying to join two data sets with a data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76135#M16442</link>
    <description>Flip,&lt;BR /&gt;
Thank you that clears it up.  It makes so much sense now.&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your time and help&lt;BR /&gt;
&lt;BR /&gt;
Jerry</description>
    <pubDate>Tue, 03 Mar 2009 20:27:19 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-03-03T20:27:19Z</dc:date>
    <item>
      <title>Trying to join two data sets with a data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76131#M16438</link>
      <description>I have data set A &amp;amp; B and they both have an ID column to join on.&lt;BR /&gt;
I would like to do a inner join and i'm not sure how to do that.  I am unable to use a proc sql step because i'm&lt;BR /&gt;
trying to learn more about data steps and how they are used.&lt;BR /&gt;
&lt;BR /&gt;
Table A&lt;BR /&gt;
ID	Name&lt;BR /&gt;
1	Bob&lt;BR /&gt;
2	Fred&lt;BR /&gt;
3	Dave&lt;BR /&gt;
&lt;BR /&gt;
Table B&lt;BR /&gt;
ID	Age&lt;BR /&gt;
1	30&lt;BR /&gt;
3	40&lt;BR /&gt;
&lt;BR /&gt;
I would like my data set to be &lt;BR /&gt;
ID 	Name Age&lt;BR /&gt;
1	Bob  30&lt;BR /&gt;
3   Dave 40&lt;BR /&gt;
&lt;BR /&gt;
With this merge it brings back everything from both.  Is there an option i'm missing or can't I do that with a merge?&lt;BR /&gt;
data C ;&lt;BR /&gt;
merge A B;&lt;BR /&gt;
by ID ;&lt;BR /&gt;
run ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thank you for an advice</description>
      <pubDate>Tue, 03 Mar 2009 16:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76131#M16438</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-03T16:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to join two data sets with a data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76132#M16439</link>
      <description>data C ;&lt;BR /&gt;
merge A(in = aval)  B(in = bval);&lt;BR /&gt;
by ID ;&lt;BR /&gt;
if aval and bval;&lt;BR /&gt;
run ;&lt;BR /&gt;
&lt;BR /&gt;
The IN opperator tells you if the value is in that table.</description>
      <pubDate>Tue, 03 Mar 2009 16:59:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76132#M16439</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-03-03T16:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to join two data sets with a data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76133#M16440</link>
      <description>Flip,&lt;BR /&gt;
Based on my example what would aval and bval be?&lt;BR /&gt;
Are these seperate columns containing my ID for each?&lt;BR /&gt;
&lt;BR /&gt;
Thank you for the reply.</description>
      <pubDate>Tue, 03 Mar 2009 17:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76133#M16440</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-03T17:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to join two data sets with a data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76134#M16441</link>
      <description>They are temporary variables set by the (in= varname) option.  They indicate which table the value comes from.&lt;BR /&gt;
&lt;A href="http://www.cpc.unc.edu/services/computer/presentations/sasclass99/merge.html" target="_blank"&gt;http://www.cpc.unc.edu/services/computer/presentations/sasclass99/merge.html&lt;/A&gt;</description>
      <pubDate>Tue, 03 Mar 2009 19:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76134#M16441</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-03-03T19:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to join two data sets with a data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76135#M16442</link>
      <description>Flip,&lt;BR /&gt;
Thank you that clears it up.  It makes so much sense now.&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your time and help&lt;BR /&gt;
&lt;BR /&gt;
Jerry</description>
      <pubDate>Tue, 03 Mar 2009 20:27:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-join-two-data-sets-with-a-data-step/m-p/76135#M16442</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-03T20:27:19Z</dc:date>
    </item>
  </channel>
</rss>

