<?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: Merging two datasets in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609259#M177375</link>
    <description>&lt;P&gt;Hi Jag. Thank you again. I tried it however it is giving me the same thing.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 112        /*Merge the two datasets*/
 113        data NewAcctNum;
 114        merge Location_Data Purchases;
 ERROR: Variable AcctNum has been defined as both character and numeric.
 115        by AcctNums;
 116        run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm wondering if there is a way to specify whether it's character or numeric.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2019 04:31:53 GMT</pubDate>
    <dc:creator>aabbccwyt</dc:creator>
    <dc:date>2019-12-04T04:31:53Z</dc:date>
    <item>
      <title>Merging two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609257#M177373</link>
      <description>&lt;P&gt;Hi, I'm trying to merge two datasets by the same variable AcctNums:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data NewAcctNum;
        set NewAcctNum;
	merge Location_Data Purchases;
	by AcctNums;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And it gives me "&lt;SPAN&gt;Variable AcctNum has been defined as both character and numeric.". I have already changed the variable AcctNum to a Numeric variable so I have no idea what I have done wrong. Can someone help please? Thank you. (It was a 1-1 merging.)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 04:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609257#M177373</guid>
      <dc:creator>aabbccwyt</dc:creator>
      <dc:date>2019-12-04T04:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609258#M177374</link>
      <description>&lt;P&gt;You cannot use the set statement in merge , try the below code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data NewAcctNum;
	merge Location_Data Purchases;
	by AcctNums;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Dec 2019 04:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609258#M177374</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-12-04T04:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609259#M177375</link>
      <description>&lt;P&gt;Hi Jag. Thank you again. I tried it however it is giving me the same thing.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 112        /*Merge the two datasets*/
 113        data NewAcctNum;
 114        merge Location_Data Purchases;
 ERROR: Variable AcctNum has been defined as both character and numeric.
 115        by AcctNums;
 116        run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm wondering if there is a way to specify whether it's character or numeric.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 04:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609259#M177375</guid>
      <dc:creator>aabbccwyt</dc:creator>
      <dc:date>2019-12-04T04:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609260#M177376</link>
      <description>Unless i see that data i may not provide the solution,but you should try and check if the variable in location_data or purchases dataset has the acctnum as character or numeric , it should be same in both the datasets.</description>
      <pubDate>Wed, 04 Dec 2019 04:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609260#M177376</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-12-04T04:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609266#M177380</link>
      <description>&lt;P&gt;Does the error say “Acctnum...” or “Acctnum&lt;STRONG&gt;s&lt;/STRONG&gt;...”? Your merge step says Acctnums but the error you detail lists Acctnum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;be sure that you’re merging on the correct variable.&lt;/P&gt;
&lt;P&gt;-unison&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 05:35:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609266#M177380</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-12-04T05:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Merging two datasets</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609288#M177390</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292388"&gt;@aabbccwyt&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Jag. Thank you again. I tried it however it is giving me the same thing.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 112        /*Merge the two datasets*/
 113        data NewAcctNum;
 114        merge Location_Data Purchases;
 ERROR: Variable AcctNum has been defined as both character and numeric.
 115        by AcctNums;
 116        run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm wondering if there is a way to specify whether it's character or numeric.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Such issues almost always arise when proc import is used for reading data. Using a data step is recommended to prevent such situations. So, if you can: fix the import. If you can't do that, you will have to process one of the datasets and convert the numeric version to char.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 07:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-two-datasets/m-p/609288#M177390</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-12-04T07:36:56Z</dc:date>
    </item>
  </channel>
</rss>

