<?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 Merge tables having the same variables of different data types. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Merge-tables-having-the-same-variables-of-different-data-types/m-p/73666#M21362</link>
    <description>I need to merge two tables. Here's the situation :&lt;BR /&gt;
&lt;BR /&gt;
The base table CTS.A (has numeric variable called var)&lt;BR /&gt;
Table which needs to be merged : CTS.B (has a character variable called var, it has both number and character values)&lt;BR /&gt;
&lt;BR /&gt;
when i merge now, the merged data set contains null values for var from CTS.B&lt;BR /&gt;
&lt;BR /&gt;
I want the merged data set to contain number values of var from CTS.B. The character values can &lt;I&gt;eat shit and die&lt;/I&gt;.&lt;BR /&gt;
&lt;BR /&gt;
Is there an easy way to do this?? without going back to modify CTS.B ??&lt;BR /&gt;
&lt;BR /&gt;
-mosas</description>
    <pubDate>Tue, 06 Apr 2010 15:16:00 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-04-06T15:16:00Z</dc:date>
    <item>
      <title>Merge tables having the same variables of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge-tables-having-the-same-variables-of-different-data-types/m-p/73666#M21362</link>
      <description>I need to merge two tables. Here's the situation :&lt;BR /&gt;
&lt;BR /&gt;
The base table CTS.A (has numeric variable called var)&lt;BR /&gt;
Table which needs to be merged : CTS.B (has a character variable called var, it has both number and character values)&lt;BR /&gt;
&lt;BR /&gt;
when i merge now, the merged data set contains null values for var from CTS.B&lt;BR /&gt;
&lt;BR /&gt;
I want the merged data set to contain number values of var from CTS.B. The character values can &lt;I&gt;eat shit and die&lt;/I&gt;.&lt;BR /&gt;
&lt;BR /&gt;
Is there an easy way to do this?? without going back to modify CTS.B ??&lt;BR /&gt;
&lt;BR /&gt;
-mosas</description>
      <pubDate>Tue, 06 Apr 2010 15:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge-tables-having-the-same-variables-of-different-data-types/m-p/73666#M21362</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-04-06T15:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Merge tables having the same variables of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge-tables-having-the-same-variables-of-different-data-types/m-p/73667#M21363</link>
      <description>Suggest you lose the subjective commentary and limit your posts to pertinent / relevant discussion.&lt;BR /&gt;
&lt;BR /&gt;
So you can use the ANYALPHA function to filter our your character variable input from CTS.B, in either a prior DATA step or a nested query (if using PROC SQL).&lt;BR /&gt;
&lt;BR /&gt;
And, also, you will need to use the SAS INPUT function to convert the CHARACTER variable to a SAS NUMERIC type variable in order to work with either a MERGE in a DATA step or a PROC SQL JOIN.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search arguments, this topic/post:&lt;BR /&gt;
convert character variable numeric site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
proc sql join merge files site:sas.com</description>
      <pubDate>Tue, 06 Apr 2010 16:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge-tables-having-the-same-variables-of-different-data-types/m-p/73667#M21363</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-04-06T16:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Merge tables having the same variables of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Merge-tables-having-the-same-variables-of-different-data-types/m-p/73668#M21364</link>
      <description>Thank you Scott!</description>
      <pubDate>Wed, 07 Apr 2010 09:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Merge-tables-having-the-same-variables-of-different-data-types/m-p/73668#M21364</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-04-07T09:34:44Z</dc:date>
    </item>
  </channel>
</rss>

