title: An expression of non-boolean type specified in a context where a condition is expected, near 'end'. error
body: <pre><code>select *
  from DBNAME.dbo.Shell_V36 V
  inner join 
  DBNAME.DBO.Promo P 
  on 
  Case  
  when 
  (V.Product = P.From_Product_Code) 
  And  (V.cur_date &gt;= P.Promo_end_date)
  or (V.cur_date &lt;= P.Promo_start_date)
  then (P.To_Product_Code)
  else(P.From_Product_Code)
  end 
  </code></pre>
  
  <p>i am getting "An expression of non-boolean type specified in a context where a condition is expected, near 'end'." can any one help me out please.</p>