<?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 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/352175#M82056</link>
    <description>&lt;P&gt;I want to use where statement to select a date between two character dates(date9.)..&lt;/P&gt;&lt;P&gt;what I have written is like:&lt;/P&gt;&lt;PRE&gt;data class1.dev_data1;                                                                                                                  
set class1.new_dev3;                                                                                                                  
where '01MAY2013'd &amp;lt; Loan_disbursement_date_ &amp;lt; '30APR2014'd;                                                                            
run; 

&lt;/PRE&gt;&lt;P&gt;but it gives a error as "Where clause operator requires compatible variables".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2017 13:52:32 GMT</pubDate>
    <dc:creator>bits</dc:creator>
    <dc:date>2017-04-21T13:52:32Z</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/352175#M82056</link>
      <description>&lt;P&gt;I want to use where statement to select a date between two character dates(date9.)..&lt;/P&gt;&lt;P&gt;what I have written is like:&lt;/P&gt;&lt;PRE&gt;data class1.dev_data1;                                                                                                                  
set class1.new_dev3;                                                                                                                  
where '01MAY2013'd &amp;lt; Loan_disbursement_date_ &amp;lt; '30APR2014'd;                                                                            
run; 

&lt;/PRE&gt;&lt;P&gt;but it gives a error as "Where clause operator requires compatible variables".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 13:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-Where-clause-operator-requires-compatible-variables/m-p/352175#M82056</guid>
      <dc:creator>bits</dc:creator>
      <dc:date>2017-04-21T13:52:32Z</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/352176#M82057</link>
      <description>&lt;P&gt;Run&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data = class1.new_dev3; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and see what type of variable Loan_disbursement_date_ is..&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 13:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-Where-clause-operator-requires-compatible-variables/m-p/352176#M82057</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-04-21T13: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/352180#M82060</link>
      <description>&lt;P&gt;Did you not ask the same question a few days back? &amp;nbsp;If not then there is a question from a few days back exactly the same. &amp;nbsp;What this is telling you is that the variable&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Loan_disbursement_date_ &lt;/PRE&gt;
&lt;P&gt;Is not a numeric variable. &amp;nbsp;Dates and times are numerics and you cannot compare something which is not numeric with numerics in that kind of logic sequence. &amp;nbsp;Fixing your data so that the date is actually a numeric SAS date would sort this, so would:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data class1.dev_data1;                                                                                                                  
  set class1.new_dev3;                                                                                                                  
  where '01MAY2013'd &amp;lt; input(Loan_disbursement_date_,date9.) &amp;lt; '30APR2014'd;                                                                            
run; &lt;/PRE&gt;
&lt;P&gt;Assuming that it is in date9. format.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 14:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-Where-clause-operator-requires-compatible-variables/m-p/352180#M82060</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-21T14:07:45Z</dc:date>
    </item>
  </channel>
</rss>

