<?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: Partial Merger of two data steps in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Partial-Merger-of-two-data-steps/m-p/11875#M1502</link>
    <description>Thanks</description>
    <pubDate>Mon, 13 Jun 2011 14:18:36 GMT</pubDate>
    <dc:creator>MARS</dc:creator>
    <dc:date>2011-06-13T14:18:36Z</dc:date>
    <item>
      <title>Partial Merger of two data steps</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Partial-Merger-of-two-data-steps/m-p/11873#M1500</link>
      <description>Can some please help me on following issue.&lt;BR /&gt;
&lt;BR /&gt;
I want to merge two sas datasets to create a new data set.&lt;BR /&gt;
&lt;BR /&gt;
However, I only need to few specific variables from the second data set to be included in the new merged data set.&lt;BR /&gt;
&lt;BR /&gt;
Can somebody tell me the SAS-CODE to use for this purpose i.e two include only specific variables from one data set in the merge step.&lt;BR /&gt;
&lt;BR /&gt;
(Please not that I have very huge data sets)</description>
      <pubDate>Mon, 13 Jun 2011 13:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Partial-Merger-of-two-data-steps/m-p/11873#M1500</guid>
      <dc:creator>MARS</dc:creator>
      <dc:date>2011-06-13T13:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Partial Merger of two data steps</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Partial-Merger-of-two-data-steps/m-p/11874#M1501</link>
      <description>Hello Mars,&lt;BR /&gt;
&lt;BR /&gt;
These are two common approaches to your problem:&lt;BR /&gt;
a) with a datastep (d1 and d2 should be sorted by X before merging):&lt;BR /&gt;
data c;&lt;BR /&gt;
  merge d1(in=d1ind)  d2(keep=X A B);&lt;BR /&gt;
  if d1ind;&lt;BR /&gt;
  by X;&lt;BR /&gt;
run;&lt;BR /&gt;
a) with proc SQL:&lt;BR /&gt;
proc SQL;&lt;BR /&gt;
  create table c as&lt;BR /&gt;
  select a.*, b.A, b.B&lt;BR /&gt;
  from d1 as a left join d2 as b on a.X=b.X&lt;BR /&gt;
;quit;&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Mon, 13 Jun 2011 14:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Partial-Merger-of-two-data-steps/m-p/11874#M1501</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-06-13T14:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Partial Merger of two data steps</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Partial-Merger-of-two-data-steps/m-p/11875#M1502</link>
      <description>Thanks</description>
      <pubDate>Mon, 13 Jun 2011 14:18:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Partial-Merger-of-two-data-steps/m-p/11875#M1502</guid>
      <dc:creator>MARS</dc:creator>
      <dc:date>2011-06-13T14:18:36Z</dc:date>
    </item>
  </channel>
</rss>

