title: How can you perform a join when also using a comma-separated list of tables in an SQL select statement?
body: <p>This is evidently correct syntax in SQL Server:</p>
  
  <pre><code>SELECT a.id, b.name
  FROM Table1 a, Table2 b
  WHERE a.id = b.fk1
  </code></pre>
  
  <p>So is this:</p>
  
  <pre><code>SELECT a.id, c.status
  FROM Table1 a
  JOIN Table3 c ON a.id = c.fk2
  </code></pre>
  
  <p>But this apparently isn't:</p>
  
  <pre><code>SELECT a.id, b.name, c.status
  FROM Table1 a, Table2 b
  JOIN Table3 c ON a.id = c.fk2
  WHERE a.id = b.fk1
  </code></pre>
  
  <p>I would NOT normally want to construct a query in the third case's style (and really not the first case's either), but it would probably be the path of least resistence in editing some code that's already been written at my company.  Somebody used the first form with five different tables, and I really need to work in a sixth table through a JOIN statement, without taking chances of messing up what they already have.  Even though I could re-write their stuff outright if I need to, I would really like to know how to do something like in the third case.</p>
  
  <p>Running the code exactly as-is in the examples, the third case gives me this error message:</p>
  
  <pre><code>The multi-part identifier "a.id" could not be bound.
  </code></pre>
  
  <p>What is syntactically breaking the third case?  What simple fix could be applied?  Thanks!</p>