title: SQL JOIN problem in MS Access 2007
body: <pre><code>SELECT DISTINCT bw.Bor_name
  FROM Borrower AS bw, Loan AS l
  JOIN Book_Copy AS bc
  ON l.Bc_id = bc.Bc_id
  WHERE bw.Bor_id = l.Bor_id
  GROUP BY l.Bor_id, bc.Bt_id
  HAVING COUNT( bc.Bt_id ) &gt; 1
  AND COUNT( l.Bor_id ) &gt; 1;
  </code></pre>
  
  <p>This works perfectly in a MySQL testing environment but won't work in MS Access 2007 where I actually need it run. I have a few other queries which involve using JOIN and it gives the same error for them as well: "Syntax error in FROM clause".</p>
  
  <p>Edit:</p>
  
  <pre><code>SELECT DISTINCT l.Bor_id
  FROM Loan AS l
  INNER JOIN Book_Copy AS bc
  ON l.Bc_id = bc.Bc_id
  GROUP BY l.Bor_id, bc.Bt_id
  HAVING COUNT( bc.Bt_id ) &gt; 1
  AND COUNT( l.Bor_id ) &gt; 1
  </code></pre>
  
  <p>Actually this one works fine and gives me the required id number, but what I want to output is the name which is contained in the Borrower table.</p>