<?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 expression using equals in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/expression-using-equals/m-p/549406#M74486</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone see the error below? I do not see anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;9251&lt;BR /&gt;9252 create table trans1 as&lt;BR /&gt;9253&lt;BR /&gt;9254 select itmCode_id as itemCode_id label="itemCode_id", itmCode as itemCode&lt;BR /&gt;9254! label="itemCode", itmDescr label="itemDesc",&lt;BR /&gt;9255 period as ioYear, sum(val) as proVal label="proVal"&lt;BR /&gt;9256 from sqltrn.dataView&lt;BR /&gt;9257 where period = 2012&lt;BR /&gt;9258 and datasetName = 'annual17'&lt;BR /&gt;9259 and schemaName = 'NAICS12'&lt;BR /&gt;9260 and valType in ('DOM','IMP','CTX')&lt;BR /&gt;9261 group by itmCode_id, itmCode, itmDescr, period&lt;BR /&gt;9262 order by itmCode_id&lt;BR /&gt;9263 ;&lt;BR /&gt;ERROR: Expression using equals (=) has components that are of different data types.&lt;BR /&gt;9264 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.04 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2019 20:00:06 GMT</pubDate>
    <dc:creator>Afor910327</dc:creator>
    <dc:date>2019-04-08T20:00:06Z</dc:date>
    <item>
      <title>expression using equals</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/expression-using-equals/m-p/549406#M74486</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone see the error below? I do not see anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;9251&lt;BR /&gt;9252 create table trans1 as&lt;BR /&gt;9253&lt;BR /&gt;9254 select itmCode_id as itemCode_id label="itemCode_id", itmCode as itemCode&lt;BR /&gt;9254! label="itemCode", itmDescr label="itemDesc",&lt;BR /&gt;9255 period as ioYear, sum(val) as proVal label="proVal"&lt;BR /&gt;9256 from sqltrn.dataView&lt;BR /&gt;9257 where period = 2012&lt;BR /&gt;9258 and datasetName = 'annual17'&lt;BR /&gt;9259 and schemaName = 'NAICS12'&lt;BR /&gt;9260 and valType in ('DOM','IMP','CTX')&lt;BR /&gt;9261 group by itmCode_id, itmCode, itmDescr, period&lt;BR /&gt;9262 order by itmCode_id&lt;BR /&gt;9263 ;&lt;BR /&gt;ERROR: Expression using equals (=) has components that are of different data types.&lt;BR /&gt;9264 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.04 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 20:00:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/expression-using-equals/m-p/549406#M74486</guid>
      <dc:creator>Afor910327</dc:creator>
      <dc:date>2019-04-08T20:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: expression using equals</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/expression-using-equals/m-p/549410#M74487</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/105695"&gt;@Afor910327&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone see the error below? I do not see anything.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;9251&lt;BR /&gt;9252 create table trans1 as&lt;BR /&gt;9253&lt;BR /&gt;9254 select itmCode_id as itemCode_id label="itemCode_id", itmCode as itemCode&lt;BR /&gt;9254! label="itemCode", itmDescr label="itemDesc",&lt;BR /&gt;9255 period as ioYear, sum(val) as proVal label="proVal"&lt;BR /&gt;9256 from sqltrn.dataView&lt;BR /&gt;9257 where period = 2012&lt;BR /&gt;9258 and datasetName = 'annual17'&lt;BR /&gt;9259 and schemaName = 'NAICS12'&lt;BR /&gt;9260 and valType in ('DOM','IMP','CTX')&lt;BR /&gt;9261 group by itmCode_id, itmCode, itmDescr, period&lt;BR /&gt;9262 order by itmCode_id&lt;BR /&gt;9263 ;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR: Expression using equals (=) has components that are of different data types.&lt;/FONT&gt;&lt;BR /&gt;9264 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.04 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ERROR: Expression using equals (=) has components that are of different data types.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;This indicates one of your variables is not the right type given the testing in the WHERE clause.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;period = 2012 means the variable period must be numeric (is it?)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;datasetName = 'annual17' means that datasetName must be character (is it?)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;same for SchemaName and ValType&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 20:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/expression-using-equals/m-p/549410#M74487</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-08T20:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: expression using equals</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/expression-using-equals/m-p/549478#M74489</link>
      <description>&lt;P&gt;Maxim 3: Know Your Data.&lt;/P&gt;
&lt;P&gt;Run a proc contents on dataset sqltrn.dataView to determine the types of the variables used in your where condition.&lt;/P&gt;
&lt;P&gt;My most suspected culprits:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;period might actually be character&lt;/LI&gt;
&lt;LI&gt;valtype could be coded as numeric, and have a custom format overlayed&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Please let us know what proc contents has to say.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 05:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/expression-using-equals/m-p/549478#M74489</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-04-09T05:13:55Z</dc:date>
    </item>
  </channel>
</rss>

