<?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 Error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-Error/m-p/341001#M77974</link>
    <description>&lt;P&gt;I am trying to combine three SAS data files using merge command using the following code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=orion.merger;&lt;BR /&gt;by ParcelNumber;&lt;/P&gt;&lt;P&gt;proc sort data=orion.merger1;&lt;BR /&gt;by ParcelNumber;&lt;BR /&gt;proc sort data=orion.merger2;&lt;BR /&gt;by ParcelNumber;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data orion.mergermain;&lt;BR /&gt;merge orion.merger orion.merger1 orion.merger2;&lt;BR /&gt;by ParcelNumber;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a screenshot of the log&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13563iC9FD32DC94D118AC/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="2.png" title="2.png" /&gt;</description>
    <pubDate>Tue, 14 Mar 2017 23:43:34 GMT</pubDate>
    <dc:creator>ayushupadhyay22</dc:creator>
    <dc:date>2017-03-14T23:43:34Z</dc:date>
    <item>
      <title>Merging Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Error/m-p/341001#M77974</link>
      <description>&lt;P&gt;I am trying to combine three SAS data files using merge command using the following code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=orion.merger;&lt;BR /&gt;by ParcelNumber;&lt;/P&gt;&lt;P&gt;proc sort data=orion.merger1;&lt;BR /&gt;by ParcelNumber;&lt;BR /&gt;proc sort data=orion.merger2;&lt;BR /&gt;by ParcelNumber;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data orion.mergermain;&lt;BR /&gt;merge orion.merger orion.merger1 orion.merger2;&lt;BR /&gt;by ParcelNumber;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a screenshot of the log&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13563iC9FD32DC94D118AC/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="2.png" title="2.png" /&gt;</description>
      <pubDate>Tue, 14 Mar 2017 23:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Error/m-p/341001#M77974</guid>
      <dc:creator>ayushupadhyay22</dc:creator>
      <dc:date>2017-03-14T23:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Error/m-p/341002#M77975</link>
      <description>&lt;P&gt;You have to do a proc contents on the three files and see how the variables are defined in each file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where they conflict, if they are just duplicate values (but stored in a different data type) you can drop them (using the drop option) when using the merge statement (e.g., merge orion.whatever (drop=varxx varyyy) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 23:58:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Error/m-p/341002#M77975</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-14T23:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merging Error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-Error/m-p/341007#M77976</link>
      <description>&lt;P&gt;Are you sure you want a merge? Usually merges don't have the same variables in each dataset, or if they do, you need to rename the variables so they're unique in the final data set. You can't have multiple&amp;nbsp;variables with the same name.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you may want to concatenate/append the data instead. You'll have the same issue though, variables with the same name MUST have the same type in a single data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/basess/68381/HTML/default/viewer.htm#p19t3r1gxavpoin14jdd23gcheve.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/68381/HTML/default/viewer.htm#p19t3r1gxavpoin14jdd23gcheve.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I show a method to identify which variables in are in which datasets here, but you can modify it to also show type.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/3b57ae085d9f7a36a2d95c15f04e72e6" target="_blank"&gt;https://gist.github.com/statgeek/3b57ae085d9f7a36a2d95c15f04e72e6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 00:27:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-Error/m-p/341007#M77976</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-15T00:27:28Z</dc:date>
    </item>
  </channel>
</rss>

