<?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 Merging datasets with identical variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46260#M12306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks to be exactly what I need.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Aug 2011 17:43:46 GMT</pubDate>
    <dc:creator>johnlfn</dc:creator>
    <dc:date>2011-08-10T17:43:46Z</dc:date>
    <item>
      <title>Merging datasets with identical variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46257#M12303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have 2 datasets with a common identifier variable (I'll call them base and append).&amp;nbsp;&amp;nbsp; Many variables in the base dataset are also in the append dataset (e.g. both have a phonenumber variable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'd like to do is merge the append dataset onto the base dataset using the common identifier to match.&amp;nbsp; I'd like to keep only records from the base dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In the case of a match, I'd like to update the variables in the base dataset with values from the append dataset.&amp;nbsp;&amp;nbsp; However, if the value for any variable in the append dataset is blank or missing, but it is populated in the base dataset, I'd like to keep the value of the base dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly, any varables that are only in the append dataset would be added to the base dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have code to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 17:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46257#M12303</guid>
      <dc:creator>johnlfn</dc:creator>
      <dc:date>2011-08-10T17:29:04Z</dc:date>
    </item>
    <item>
      <title>Merging datasets with identical variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46258#M12304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked into the update statement in a datastep?&amp;nbsp; If not, take a look at:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001329151.htm"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001329151.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 17:40:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46258#M12304</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-10T17:40:33Z</dc:date>
    </item>
    <item>
      <title>Merging datasets with identical variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46259#M12305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that this is what the UPDATE statement is meant to do.&amp;nbsp; Check the documentation for your version of SAS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 17:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46259#M12305</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2011-08-10T17:42:57Z</dc:date>
    </item>
    <item>
      <title>Merging datasets with identical variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46260#M12306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks to be exactly what I need.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 17:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46260#M12306</guid>
      <dc:creator>johnlfn</dc:creator>
      <dc:date>2011-08-10T17:43:46Z</dc:date>
    </item>
    <item>
      <title>Merging datasets with identical variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46261#M12307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 17:44:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merging-datasets-with-identical-variables/m-p/46261#M12307</guid>
      <dc:creator>johnlfn</dc:creator>
      <dc:date>2011-08-10T17:44:17Z</dc:date>
    </item>
  </channel>
</rss>

