title: sql server check for greater than with select statement
body: <p>Why can't I do something like this:</p>
  
  <pre><code>    select distinct ps.ID, from vwList wt
      where Flag = 1 
      and GETDATE()  &lt; (select dbo.fn_Date(ps.date1,ps.UploadDate) from pseres ps where ps.ID = wt.ID)  
  </code></pre>
  
  <p>I get The multi-part identifier "ps.ID" could not be bound.   </p>