<?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: Persistent ERROR: Expression using equals (=) has components regardless of variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828317#M327195</link>
    <description>&lt;P&gt;I'm guessing without the actual code, but the SAS log isn't usually wrong.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2022 16:37:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2022-08-11T16:37:39Z</dc:date>
    <item>
      <title>Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828296#M327180</link>
      <description>&lt;P&gt;The&amp;nbsp;ERROR: Expression using equals (=) has components that are of different data types keep coming up in my log regardless of what variable is being used. Whatever is the last variable before the final quit statement shows that error. Tried multiple attempts at converting variables to character and numeric to try and match, removing variables from the join, reformatting the imported excel file, and rearranging order for the join to no avail. It's driving me crazy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT=Table_1a&lt;BR /&gt;DATAFILE= "FilePath.XLSX"&lt;BR /&gt;DBMS=XLSX /*XLSX*/ REPLACE;&lt;BR /&gt;SHEET="Request File";&lt;BR /&gt;GETNAMES=YES ;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE Table_1b AS&lt;BR /&gt;SELECT DISTINCT A.IDrequestR as RID&lt;BR /&gt;, A.name_last&lt;BR /&gt;, A.name_first&lt;BR /&gt;, A.name_middle&lt;BR /&gt;, A.DOB&lt;BR /&gt;, upcase(A.race) as Race&lt;BR /&gt;, upcase(A.gender) as Gender&lt;BR /&gt;FROM work.Table_1a as A&lt;BR /&gt;ORDER BY A.IDrequestR&lt;BR /&gt;;QUIT;&lt;BR /&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE Table_2 AS&lt;BR /&gt;SELECT DISTINCT A.*&lt;BR /&gt;, B.DID&lt;BR /&gt;FROM Work.Table_1b as A&lt;BR /&gt;LEFT JOIN Dev.Person_Demographics as B&lt;BR /&gt;ON A.Gender = B.Gender_De&lt;BR /&gt;AND A.DOB = B.PRBRTH_DT&lt;BR /&gt;AND A.name_last = B.INDVNM_LAST_NM&lt;BR /&gt;AND A.name_first = B.INDVNM_FRST_NM&lt;BR /&gt;;QUIT;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 15:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828296#M327180</guid>
      <dc:creator>cbagdon-cox</dc:creator>
      <dc:date>2022-08-11T15:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828299#M327182</link>
      <description>&lt;P&gt;Run a proc contents on table_1a and table_1b and look for the differences between the Gender and Date of Birth columns. I'm guessing one of those is character and one is numeric with a date format. Post that information here, with how the variable looks for each (ie 2022/08/11 or 11Aug2022) and we can help you fix the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329801"&gt;@cbagdon-cox&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The&amp;nbsp;ERROR: Expression using equals (=) has components that are of different data types keep coming up in my log regardless of what variable is being used. Whatever is the last variable before the final quit statement shows that error. Tried multiple attempts at converting variables to character and numeric to try and match, removing variables from the join, reformatting the imported excel file, and rearranging order for the join to no avail. It's driving me crazy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC IMPORT OUT=Table_1a&lt;BR /&gt;DATAFILE= "FilePath.XLSX"&lt;BR /&gt;DBMS=XLSX /*XLSX*/ REPLACE;&lt;BR /&gt;SHEET="Request File";&lt;BR /&gt;GETNAMES=YES ;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE Table_1b AS&lt;BR /&gt;SELECT DISTINCT A.IDrequestR as RID&lt;BR /&gt;, A.name_last&lt;BR /&gt;, A.name_first&lt;BR /&gt;, A.name_middle&lt;BR /&gt;, A.DOB&lt;BR /&gt;, upcase(A.race) as Race&lt;BR /&gt;, upcase(A.gender) as Gender&lt;BR /&gt;FROM work.Table_1a as A&lt;BR /&gt;ORDER BY A.IDrequestR&lt;BR /&gt;;QUIT;&lt;BR /&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE Table_2 AS&lt;BR /&gt;SELECT DISTINCT A.*&lt;BR /&gt;, B.DID&lt;BR /&gt;FROM Work.Table_1b as A&lt;BR /&gt;LEFT JOIN Dev.Person_Demographics as B&lt;BR /&gt;ON A.Gender = B.Gender_De&lt;BR /&gt;AND A.DOB = B.PRBRTH_DT&lt;BR /&gt;AND A.name_last = B.INDVNM_LAST_NM&lt;BR /&gt;AND A.name_first = B.INDVNM_FRST_NM&lt;BR /&gt;;QUIT;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828299#M327182</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-08-11T16:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828304#M327186</link>
      <description>&lt;P&gt;Table 1a and Table 1c are using the same variables. The problem is with the join between table 1c variables and the dev.person_demographics table. I put the proc contents for those below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Variables in Creation Order# Variable Type Len Format Informat Label1234567 &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;RID&lt;/TD&gt;&lt;TD&gt;Num&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;BEST.&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;RID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name_last&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;17&lt;/TD&gt;&lt;TD&gt;$17.&lt;/TD&gt;&lt;TD&gt;$17.&lt;/TD&gt;&lt;TD&gt;name_last&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name_first&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;$15.&lt;/TD&gt;&lt;TD&gt;$15.&lt;/TD&gt;&lt;TD&gt;name_first&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;name_middle&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;$15.&lt;/TD&gt;&lt;TD&gt;$15.&lt;/TD&gt;&lt;TD&gt;name_middle&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&g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D&gt;&lt;P&gt;Char&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;$20.&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;$20.&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;INDVNM_MDL_NM&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;28&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;INDVNM_LAST_NM&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Char&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;50&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;$50.&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;$50.&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;INDVNM_LAST_NM&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828304#M327186</guid>
      <dc:creator>cbagdon-cox</dc:creator>
      <dc:date>2022-08-11T16:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828305#M327187</link>
      <description>&lt;P&gt;So the SAS error is correct, the date of birth variables have different types.&lt;/P&gt;
&lt;P&gt;I don't see the&amp;nbsp;&lt;STRONG&gt;current format of DOB though&lt;/STRONG&gt;, which is required to accurately convert it, so what does it look like? ie 01Aug2022 or 2022/08/01...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This may work but it would be better to use the correct informat, ie date9, mmddyy than anydtdte which guesses. And can guess wrong.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
CREATE TABLE Table_2 AS
SELECT DISTINCT A.*
, B.DID
FROM Work.Table_1b as A
LEFT JOIN Dev.Person_Demographics as B
ON A.Gender = B.Gender_De
AND input(A.DOB, anydtdte.) = B.PRBRTH_DT
AND A.name_last = B.INDVNM_LAST_NM
AND A.name_first = B.INDVNM_FRST_NM
;QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329801"&gt;@cbagdon-cox&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Table 1a and Table 1c are using the same variables. The problem is with the join between table 1c variables and the dev.person_demographics table. I put the proc contents for those below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;Variables in Creation Order# Variable Type Len Format Informat Label1234567
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;RID&lt;/TD&gt;
&lt;TD&gt;Num&lt;/TD&gt;
&lt;TD&gt;8&lt;/TD&gt;
&lt;TD&gt;BEST.&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;RID&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;name_last&lt;/TD&gt;
&lt;TD&gt;Char&lt;/TD&gt;
&lt;TD&gt;17&lt;/TD&gt;
&lt;TD&gt;$17.&lt;/TD&gt;
&lt;TD&gt;$17.&lt;/TD&gt;
&lt;TD&gt;name_last&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;name_first&lt;/TD&gt;
&lt;TD&gt;Char&lt;/TD&gt;
&lt;TD&gt;15&lt;/TD&gt;
&lt;TD&gt;$15.&lt;/TD&gt;
&lt;TD&gt;$15.&lt;/TD&gt;
&lt;TD&gt;name_first&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;name_middle&lt;/TD&gt;
&lt;TD&gt;Char&lt;/TD&gt;
&lt;TD&gt;15&lt;/TD&gt;
&lt;TD&gt;$15.&lt;/TD&gt;
&lt;TD&gt;$15.&lt;/TD&gt;
&lt;TD&gt;name_middle&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;DOB&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Char&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Race&lt;/TD&gt;
&lt;TD&gt;Char&lt;/TD&gt;
&lt;TD&gt;38&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Gender&lt;/TD&gt;
&lt;TD&gt;Char&lt;/TD&gt;
&lt;TD&gt;7&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;Variables in Creation Order&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;#&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;Variable&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="47.1562px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="40px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;Len&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="66.7188px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;Format&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;Informat&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;Label&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;DID&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="47.1562px" height="30px"&gt;
&lt;P&gt;Num&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="40px" height="30px"&gt;
&lt;P&gt;8&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="66.7188px" height="30px"&gt;
&lt;P&gt;11.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75px" height="30px"&gt;
&lt;P&gt;11.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;DID&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;GENDER_DE&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="47.1562px" height="30px"&gt;
&lt;P&gt;Char&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="40px" height="30px"&gt;
&lt;P&gt;7&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="66.7188px" height="30px"&gt;
&lt;P&gt;$7.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75px" height="30px"&gt;
&lt;P&gt;$7.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;GENDER_DE&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;11&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;RACE_DE&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="47.1562px" height="30px"&gt;
&lt;P&gt;Char&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="40px" height="30px"&gt;
&lt;P&gt;30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="66.7188px" height="30px"&gt;
&lt;P&gt;$30.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75px" height="30px"&gt;
&lt;P&gt;$30.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;RACE_DE&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;13&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;PRBRTH_DT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="47.1562px" height="30px"&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Num&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="40px" height="30px"&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="66.7188px" height="30px"&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;DATE9.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75px" height="30px"&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;DATE9.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;PRBRTH_DT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;26&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;INDVNM_FRST_NM&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="47.1562px" height="30px"&gt;
&lt;P&gt;Char&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="40px" height="30px"&gt;
&lt;P&gt;30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="66.7188px" height="30px"&gt;
&lt;P&gt;$30.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75px" height="30px"&gt;
&lt;P&gt;$30.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;INDVNM_FRST_NM&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;27&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;INDVNM_MDL_NM&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="47.1562px" height="30px"&gt;
&lt;P&gt;Char&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="40px" height="30px"&gt;
&lt;P&gt;20&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="66.7188px" height="30px"&gt;
&lt;P&gt;$20.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75px" height="30px"&gt;
&lt;P&gt;$20.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;INDVNM_MDL_NM&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="217.297px" height="30px"&gt;
&lt;P&gt;&lt;STRONG&gt;28&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;INDVNM_LAST_NM&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="47.1562px" height="30px"&gt;
&lt;P&gt;Char&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="40px" height="30px"&gt;
&lt;P&gt;50&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="66.7188px" height="30px"&gt;
&lt;P&gt;$50.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="75px" height="30px"&gt;
&lt;P&gt;$50.&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="158.562px" height="30px"&gt;
&lt;P&gt;INDVNM_LAST_NM&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828305#M327187</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-08-11T16:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828306#M327188</link>
      <description>&lt;P&gt;So DOB is a character string and PRBRTH_DT is the number of days since 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the string in DOB and see if they follow the pattern that the DATE. informat can understand.&amp;nbsp; If they do then use the INPUT() function in your ON criteria.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input(dob,date9.) = prbirth_dt&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:27:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828306#M327188</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-08-11T16:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828307#M327189</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329801"&gt;@cbagdon-cox&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;PROC IMPORT&lt;/STRONG&gt; &lt;/FONT&gt;OUT=Table_1a&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;DATAFILE= "FilePath.XLSX"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;DBMS=XLSX /*XLSX*/ REPLACE;&lt;BR /&gt;SHEET="Request File";&lt;BR /&gt;GETNAMES=YES ;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Highlighted text is probably the most common cause of that particular error.&lt;/P&gt;
&lt;P&gt;Proc Import uses external rules to "guess" as to the variable types and attributes because spreadsheet software does not impose any constraints. In a single column of a spread sheet you can have text (of multiple lengths), numeric values, dates and/or times. So SAS, which does have constraints on VARIABLES has to pick one type, numeric or character for all values in that COLUMN, and assign characteristics like formats. Because the rules are based on the contents of the columns if one sheet that is imported has character data at the top it will get treated as character, if the values only hold digits then the value becomes numeric. So two different spreadsheets that supposedly have similar values get treated differently by Proc Import based on the order of the values.&lt;/P&gt;
&lt;P&gt;You don't even mention a guess or describe which variable(s) comparisons are involved. My guess is that the DOB and the PRBIRTH_dt are the most likely to be involved. Possibly because some , or all, of the dates involved in one of the sets had some values entered as text and the others used the underlying Excel numeric values with a display set to look similar to the text of the other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The general advice is to ALWAYS check the result of Proc Import for variable types, especially ones that you intend to compare with others &lt;STRONG&gt;or&lt;/STRONG&gt; to combine into a single data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution if you are going to be dealing with multiple files that have the supposed same structure is to not use Proc Import. Instead save the file to CSV and write a data step to read the text file and set the exact same properties for every file read.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828307#M327189</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-11T16:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828309#M327190</link>
      <description>&lt;P&gt;It worked! Why it wouldn't allow me to change the format of DOB in the table_1c code {used input(A.DOB,$date9.) as DOB} refused to work but running it in the join worked is beyond me. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:29:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828309#M327190</guid>
      <dc:creator>cbagdon-cox</dc:creator>
      <dc:date>2022-08-11T16:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828311#M327191</link>
      <description>&lt;P&gt;This did not work and gave the same error.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:31:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828311#M327191</guid>
      <dc:creator>cbagdon-cox</dc:creator>
      <dc:date>2022-08-11T16:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828312#M327192</link>
      <description>&lt;P&gt;You have to change it on the join as well as in the SELECT code. The informat would be date9, not $date9. as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your informat is date9, it's better to use that than to use anydtdte.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:32:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828312#M327192</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-08-11T16:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828316#M327194</link>
      <description>&lt;P&gt;using date9. would through this error:&amp;nbsp;ERROR: INPUT function requires a character argument.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828316#M327194</guid>
      <dc:creator>cbagdon-cox</dc:creator>
      <dc:date>2022-08-11T16:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828317#M327195</link>
      <description>&lt;P&gt;I'm guessing without the actual code, but the SAS log isn't usually wrong.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 16:37:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828317#M327195</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-08-11T16:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828320#M327197</link>
      <description>I'm still baffled as to why the log wasn't identifying DOB as the problem variable and instead was showing the error for whatever was the last variable before the quit statement, not very helpful.</description>
      <pubDate>Thu, 11 Aug 2022 16:38:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828320#M327197</guid>
      <dc:creator>cbagdon-cox</dc:creator>
      <dc:date>2022-08-11T16:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Persistent ERROR: Expression using equals (=) has components regardless of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828356#M327218</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329801"&gt;@cbagdon-cox&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I'm still baffled as to why the log wasn't identifying DOB as the problem variable and instead was showing the error for whatever was the last variable before the quit statement, not very helpful.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;One has a strong suspicion that the SAS developers sort of gave up on deciding where to attempt to place an error indicator since the places using an = might have multiple functions with multiple variables, sub-query results and such. So the error comes at the end of the whole statement , not 'the last variable'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this example where a text version of age was added to a copy of SASHELP.CLASS. The error comes neatly tucked in just after the semicolon that ended the create table selection and before the quit. If you had submitted multiple Create table or simple selections within a single Proc SQL call the error message does identify which specific query caused the problem&lt;/P&gt;
&lt;PRE&gt;150  proc sql;
151     create table  sqlexample as
152     select a.*, b.agetext
153     , (a.age=b.agetext) as compared
154     from sashelp.class as a
155          left join
156          work.example as b
157          on a.name=b.name
158     ;
ERROR: Expression using equals (=) has components that are of different data types.
159  quit;
&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Aug 2022 19:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Persistent-ERROR-Expression-using-equals-has-components/m-p/828356#M327218</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-11T19:36:19Z</dc:date>
    </item>
  </channel>
</rss>

