Msg 4145, Level 15, State 1, Line 1 An expression of non-boolean type specified in a context where a condition is expected
<p>Please correct my query why I am getting this error,</p>

<pre><code>select 
    a.productid, b.gender
from 
    tblperson a 
join
    tblgender b on (select productid from tblpurchase) 
</code></pre>

<p>Why I am getting this error?</p>

<blockquote>
  <p>Msg 4145, Level 15, State 1, Line 1<br>
  An expression of non-boolean type specified in a context where a condition is expected</p>
</blockquote>