<?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: Data merging in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173787#M264504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much. Thats really good to know !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Nov 2014 04:11:53 GMT</pubDate>
    <dc:creator>Venki</dc:creator>
    <dc:date>2014-11-17T04:11:53Z</dc:date>
    <item>
      <title>Data merging</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173784#M264501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff;"&gt;Hello,&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;I have 2 different datasets. Dataset 1 has about 500 observations and 15 variables and Dataset 2 has 7500 observations and 250 variables.&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;I have to import that 250 variables from Dataset 2 for that 500 observations in Dataset 1 (note 500 observations in dataset 1 are present in dataset 2 by three common identifiers: last name, first name and IDnumber)&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;If I use a&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;merge dataset1 dataset2; by firstname lastname IDnumber; &lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;I am thinking I am going to get 7500 observations with 500 of them having that 15 extra variables (-3 common identifiers) from dataset 1.&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;Any idea how else I could use to merge this and just have a new combined dataset that has 500 observations from Dataset with 15 + 250 variables ?&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;Your help is much appreciated !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 02:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173784#M264501</guid>
      <dc:creator>Venki</dc:creator>
      <dc:date>2014-11-17T02:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Data merging</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173785#M264502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out myself.&lt;/P&gt;&lt;P&gt;Just a simple delete command for a variable thats only present in dataset 1 but not in dataset2 by writing&lt;/P&gt;&lt;P&gt;if variable =' ' then delete; &lt;/P&gt;&lt;P&gt;worked like a charm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a little extra thinking that I was lacking when initially thinking about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyways for folks reading this !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 02:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173785#M264502</guid>
      <dc:creator>Venki</dc:creator>
      <dc:date>2014-11-17T02:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Data merging</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173786#M264503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You just need an extra statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.8000001907349px; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;merge dataset1&lt;SPAN style="color: #800000;"&gt;(in=inD1)&lt;/SPAN&gt; dataset2; by firstname lastname IDnumber;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000; background-color: #ffffff;"&gt;&lt;STRONG&gt;if inD1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px; background-color: #ffffff;"&gt;PG&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 02:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173786#M264503</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-11-17T02:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Data merging</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173787#M264504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much. Thats really good to know !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 04:11:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-merging/m-p/173787#M264504</guid>
      <dc:creator>Venki</dc:creator>
      <dc:date>2014-11-17T04:11:53Z</dc:date>
    </item>
  </channel>
</rss>

