title: The multi-part identifier could not be bound
body: <p>I have this very simple sql statement:</p>
  
  <pre><code>SELECT     max_dose
  FROM         psychotropes
  WHERE     (patient_meds.psychotrope = psychotrope_name) AND (patient_meds.patient_id = 12)
  </code></pre>
  
  <p>when I try to run it in Visual Studio 2008, it tells me "The multi-part 'patient_meds.psychotrope' identifier could not be bound"</p>
  
  <p>it's weird, because I did set a relationship between the two tables in the diagram viewer</p>