<?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 PROC SQL Error Message in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605427#M175717</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following error message, any idea how I would resolve please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: The Equality operator must compare operands of the same type&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;proc sql ;&lt;BR /&gt;create table work.apps as&lt;BR /&gt;select &lt;BR /&gt;a.*,&lt;BR /&gt;b.income, b.date&lt;BR /&gt;from work.comps as a left join work.apps_ytd as b&lt;BR /&gt;on a.id = b.urn;&lt;BR /&gt;quit;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2019 16:00:43 GMT</pubDate>
    <dc:creator>KC_16</dc:creator>
    <dc:date>2019-11-19T16:00:43Z</dc:date>
    <item>
      <title>PROC SQL Error Message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605427#M175717</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following error message, any idea how I would resolve please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: The Equality operator must compare operands of the same type&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;proc sql ;&lt;BR /&gt;create table work.apps as&lt;BR /&gt;select &lt;BR /&gt;a.*,&lt;BR /&gt;b.income, b.date&lt;BR /&gt;from work.comps as a left join work.apps_ytd as b&lt;BR /&gt;on a.id = b.urn;&lt;BR /&gt;quit;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 16:00:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605427#M175717</guid>
      <dc:creator>KC_16</dc:creator>
      <dc:date>2019-11-19T16:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Error Message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605430#M175718</link>
      <description>&lt;P&gt;It seems ID and&amp;nbsp;&lt;SPAN&gt;urn are not of the same datatypes. Please do proc contents of both and let us know which one is which&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 16:04:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605430#M175718</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-11-19T16:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Error Message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605435#M175719</link>
      <description>&lt;P&gt;In your condition&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;on a.id = b.urn&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;both side should be of same type, either numeric or alphanumeric.&lt;/P&gt;
&lt;P&gt;assuming&amp;nbsp;&lt;STRONG&gt;a.id&amp;nbsp;&lt;/STRONG&gt;is numeric and&amp;nbsp;&lt;STRONG&gt;b.urn&lt;/STRONG&gt; contains digits you can replace condition into:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;a.id = input(b.urn , best.)&lt;/STRONG&gt; thus transforming the alphanumeric into numeric.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 16:10:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605435#M175719</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-11-19T16:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Error Message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605437#M175720</link>
      <description>&lt;P&gt;Since id and urn are used for a join, I deduct they are not needed for calculations, so they should both be character.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 16:13:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Error-Message/m-p/605437#M175720</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-19T16:13:41Z</dc:date>
    </item>
  </channel>
</rss>

