title: Join three table in JDBC
body: <p>I have this code and keep getting a syntax error. </p>
  
  <pre><code>query = "SELECT * "+
  "FROM Product " +
  "INNER JOIN Orders ON (Product.ItemID=Orders.ItemID) " +
  "LEFT OUTER JOIN SupplierProduct ON (Orders.ItemID=SupplierProduct.ItemID) "+
  "WHERE Product.Receiver = 'Fred' " +
  "ORDER BY Product.ItemName";    
  
  DefaultTableModel data = table.getQuery(query);
  </code></pre>
  
  <p>I also have tried an <code>INNER JOIN</code> in place of the <code>LEFT OUTER JOIN</code>. The error I keep getting what ever I try is.</p>
  
  <pre><code>java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing     operator) in query expression '(Product.ItemID=Orders.ItemID) LEFT OUTER JOIN  SupplierProduct ON (Orders.ItemID=SupplierProduct.ItemID'.
  at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
  at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
  at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
  at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
  </code></pre>
  
  <p>What am I missing here or how can I JOIN three table. </p>