title: using decimal date into sql query where condition
body: <p>I have an issue to try to use a field defined as a <code>decimal(17)</code> in my table in a where condition to compare with string in a store procedure</p>
  
  <pre><code>table1.datedecimal decimal(17)
  </code></pre>
  
  <p>my sql query is</p>
  
  <pre><code>select field1, field2 
  from table1 
  where table1.datedecimal &gt;= cast(cast('3-10-2011' as datetime) as decimal)
    and table1.datedecimal &lt;= cast(cast('24-10-2011' as datetime) as decimal)
  </code></pre>
  
  <p>but my query return 0 row</p>
  
  <p>I'm appreciate if someone can help me please!!!
  Thanks</p>