<?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 ERROR: Expression using equals (=) has components that are of different data types. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581652#M34491</link>
    <description>&lt;P&gt;Hi there everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still new to the sas world and currently stuck trying to format a variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a proc sql step and I'm hitting a sequel table but the column I'm matching it with is not numeric. I'm wanting to format b.AccountNumber; to numeric&amp;nbsp; but not sure what steps to take.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql; create table FTY1 as select&lt;BR /&gt;a. *&lt;BR /&gt;,b. ResponseCodeMessage&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;from FTY a left outer join COL.biz b on a.Account_number=b.AccountNumber;&lt;BR /&gt;quit;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Aug 2019 07:05:14 GMT</pubDate>
    <dc:creator>Ela_84</dc:creator>
    <dc:date>2019-08-16T07:05:14Z</dc:date>
    <item>
      <title>ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581652#M34491</link>
      <description>&lt;P&gt;Hi there everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still new to the sas world and currently stuck trying to format a variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a proc sql step and I'm hitting a sequel table but the column I'm matching it with is not numeric. I'm wanting to format b.AccountNumber; to numeric&amp;nbsp; but not sure what steps to take.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql; create table FTY1 as select&lt;BR /&gt;a. *&lt;BR /&gt;,b. ResponseCodeMessage&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;from FTY a left outer join COL.biz b on a.Account_number=b.AccountNumber;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 07:05:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581652#M34491</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2019-08-16T07:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581653#M34492</link>
      <description>&lt;P&gt;I assume that b.AccountNumber is the one that is not numeric?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; create table FTY1 as select
a. *
,b. ResponseCodeMessage
from FTY a left outer join COL.biz b on a.Account_number=input(b.AccountNumber, best.);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Aug 2019 07:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581653#M34492</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-16T07:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581654#M34493</link>
      <description>&lt;P&gt;that's correct - Thank you SOOOO much.&lt;/P&gt;&lt;P&gt;I will give it a try and let you know if it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate this alot.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 07:07:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581654#M34493</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2019-08-16T07:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581655#M34494</link>
      <description>&lt;P&gt;Anytime, let me know if it works for you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 07:11:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581655#M34494</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-16T07:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581656#M34495</link>
      <description>&lt;P&gt;Thank you so much Draycut - it worked appreciate the help again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have an awesome day!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 07:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/581656#M34495</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2019-08-16T07:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/676469#M36717</link>
      <description>&lt;P&gt;Thanks for the answer ,useful to me.&lt;/P&gt;
&lt;P&gt;q1:&amp;nbsp; one col is&amp;nbsp; numeric and one col is char. when comparing which is best ? char to numeric conversion or numeric to char ? please give some explanation,please.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 13:14:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/676469#M36717</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2020-08-13T13:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/676586#M36721</link>
      <description>&lt;P&gt;It depends...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't you love that answer? But seriously, it does, and here are some of the considerations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're SURE that your character column always contains number, and you can reliably convert them to numeric, then I would go with numeric, as it's not subject to odd formatting issues (does '5 ' equal '5'? does ' 5' equal '5'?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're going to have issues (e.g. converting 'abc' to numeric), then you might want to go with character. It may be challenging to figure out how to convert your numeric value to character, SAS has lots of functions to help. (There's the subject for your next question!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In either case, be cautious about numbers with fractions. They don't always convert nicely to the hexadecimal used by computers, and two numbers that look similar can actually be different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My two cents worth!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Tom&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 19:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/676586#M36721</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-08-13T19:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/676993#M36746</link>
      <description>&lt;P&gt;thanks for reply.&lt;/P&gt;
&lt;P&gt;I did not get answer for my question.&lt;/P&gt;
&lt;P&gt;we can convert from numeric to character (or vice versa)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My intention is to know&amp;nbsp; which conversion should be happened to get better performance?&lt;/P&gt;
&lt;P&gt;(char to numer or numer to char)??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2020 19:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/676993#M36746</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2020-08-15T19:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/676995#M36747</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52150"&gt;@rajeshm&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we can convert from numeric to character (or vice versa)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My intention is to know&amp;nbsp; which conversion should be happened to get better performance?&lt;/P&gt;
&lt;P&gt;(char to numer or numer to char)??&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What do you mean by "performance"?&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2020 19:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/676995#M36747</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-15T19:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/677113#M36753</link>
      <description>several ways to find a solution to a problem.&lt;BR /&gt;suppose i have a case to compare numeric with char. &lt;BR /&gt;if i convert character to numeric and comparing with numeric will be executed in less time ? or&lt;BR /&gt;if i convert numeric to character and comparing with character will be executed in less time?</description>
      <pubDate>Sun, 16 Aug 2020 21:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/677113#M36753</guid>
      <dc:creator>rajeshm</dc:creator>
      <dc:date>2020-08-16T21:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using equals (=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/677114#M36754</link>
      <description>&lt;P&gt;I don't know, buy you can find the answer easily enough.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create data sets where the variable of interest is numeric and a similar data set where the variable of interest is character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then compare by converting to character to numeric. Then compare by converting numeric to character. Which one runs faster?&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 21:49:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-equals-has-components-that-are-of/m-p/677114#M36754</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-16T21:49:24Z</dc:date>
    </item>
  </channel>
</rss>

