<?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: WHERE clause operator requires compatible variables. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-WHERE-clause-operator-requires-compatible-variables/m-p/593792#M170485</link>
    <description>&lt;P&gt;So is WEEKDAY a numeric variable&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where weekday=5;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or a character variable?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where weekday="5";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;I do not see any WEEKDAY() function being used in the code you posted.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2019 15:56:01 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-10-03T15:56:01Z</dc:date>
    <item>
      <title>ERROR: WHERE clause operator requires compatible variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-WHERE-clause-operator-requires-compatible-variables/m-p/593789#M170484</link>
      <description>&lt;P&gt;i have in my data , weekno, day , name , email and type, i am trying to get if monday (2) get the row. I couldn;t find the weekname function, so i added weekday function to get the weekday number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;weekday. = 5&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data sh.ext_supp;&lt;BR /&gt;set sh.ext_support;&lt;BR /&gt;where weekno = "&amp;amp;weekday";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data sh.ext_supp;&lt;BR /&gt;476 set sh.ext_support;&lt;BR /&gt;477 weekday = put(weekday,12.3);&lt;BR /&gt;478 where weekday = "&amp;amp;weekday";&lt;BR /&gt;&lt;FONT color="#993300"&gt;ERROR: WHERE clause operator requires compatible variables.&lt;/FONT&gt;&lt;BR /&gt;479 run;&lt;/P&gt;&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by:&lt;BR /&gt;(Line):(Column).&lt;BR /&gt;477:11&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set SH.EXT_SUPP may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 6 variables.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 15:52:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-WHERE-clause-operator-requires-compatible-variables/m-p/593789#M170484</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2019-10-03T15:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: WHERE clause operator requires compatible variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-WHERE-clause-operator-requires-compatible-variables/m-p/593792#M170485</link>
      <description>&lt;P&gt;So is WEEKDAY a numeric variable&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where weekday=5;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or a character variable?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where weekday="5";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;I do not see any WEEKDAY() function being used in the code you posted.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 15:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-WHERE-clause-operator-requires-compatible-variables/m-p/593792#M170485</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-03T15:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: WHERE clause operator requires compatible variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-WHERE-clause-operator-requires-compatible-variables/m-p/593794#M170486</link>
      <description>&lt;P&gt;A where condition works only on values present in the incoming data, not on values calculated in the step.&lt;/P&gt;
&lt;P&gt;Since the weekday variable is numeric, you must compare it to a numeric value:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where weekno = &amp;amp;weekday.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since the type of a variable cannot be changed, this statement does not make sense:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;weekday = put(weekday,12.3);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Oct 2019 15:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-WHERE-clause-operator-requires-compatible-variables/m-p/593794#M170486</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-03T15:58:57Z</dc:date>
    </item>
  </channel>
</rss>

