<?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: Error: Expression using equals (=) has components that are of different data types in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935854#M42049</link>
    <description>&lt;P&gt;This is the second question with essentially the same problem cause: Not knowing your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Almost certainly you are going to have more of these, just different variables. Time to learn PROC CONTENTS to examine data sets to get properties of variables and likely to review exactly how all of these data sets are created that allow different types of variables to be created that likely should be of the same type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;General note: if a variable is not used for arithmetic, especially if it is an identifier like "account number", "product code", "part number" or similar the variable should not be numeric. But the define lengths may need to be consistent if appearing in multiple data sets.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2024 18:09:41 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-07-15T18:09:41Z</dc:date>
    <item>
      <title>Error: Expression using equals (=) has components that are of different data types</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935847#M42044</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can't find the solution to the error. pls help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table pledge20 as select&lt;BR /&gt;a.*,&lt;BR /&gt;b.waterfall_frb_ny as waterfall_frb_ny_pbnew ,&lt;BR /&gt;case when b.loan_nb is null then 1 else 0 end as missingpb&lt;BR /&gt;from pledge15 as a left join PledgeDataLoanLevel8 as b&lt;BR /&gt;on a.loan_number2 = b.loan_nb&lt;BR /&gt;;&lt;BR /&gt;quit ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cykelops&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 16:56:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935847#M42044</guid>
      <dc:creator>Cykelops</dc:creator>
      <dc:date>2024-07-15T16:56:16Z</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/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935850#M42046</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/467272"&gt;@Cykelops&lt;/a&gt;, can you share the log after you run this query?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 17:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935850#M42046</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2024-07-15T17:11:40Z</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/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935851#M42047</link>
      <description>&lt;P&gt;From now on, please help us out by posting the log for the PROC SQL (or whatever step has the error), including the code as it appears in the log. Do not show us error messages detached from the code as it appears in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;a.loan_number2 = b.loan_nb&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of these two variables is numeric, and the other is character. So you will have to convert one of these two variables to the other data type.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So let's suppose b.loan_nb is a character variable. The code to convert b.loan_nb to numeric would be&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;a.loan_number2 = input(b.loan_nb,32.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and that should work. Or if a.loan_number2 is character, then a similar change will make that work.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 17:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935851#M42047</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-15T17:19:39Z</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/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935852#M42048</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cykelosps&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 17:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935852#M42048</guid>
      <dc:creator>Cykelops</dc:creator>
      <dc:date>2024-07-15T17:41: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/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935854#M42049</link>
      <description>&lt;P&gt;This is the second question with essentially the same problem cause: Not knowing your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Almost certainly you are going to have more of these, just different variables. Time to learn PROC CONTENTS to examine data sets to get properties of variables and likely to review exactly how all of these data sets are created that allow different types of variables to be created that likely should be of the same type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;General note: if a variable is not used for arithmetic, especially if it is an identifier like "account number", "product code", "part number" or similar the variable should not be numeric. But the define lengths may need to be consistent if appearing in multiple data sets.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 18:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Error-Expression-using-equals-has-components-that-are-of/m-p/935854#M42049</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-15T18:09:41Z</dc:date>
    </item>
  </channel>
</rss>

