title: MS Access Database SQL Query
body: <p>I have 3 Tables called Invoice, Customer and Company. I want to merge this 3 tables into single using <em>Query</em>. In Invoice Table contain Customer Id and Company Id. How to Join 3 tables ?</p>
  
  <p>I tried Invoice and Customer Table working fine with this query. But I dont have idea to add 3rd table with this. </p>
  
  <pre><code>SELECT RPT_Invoice_Less.InvoiceNumber, RPT_Invoice_Less.Terms,
      RPT_Invoice_Less.Invoicedate, RPT_Invoice_Less.OurQuote,
      RPT_Invoice_Less.SalesPerson, RPT_Customer.CustomerName,
      RPT_Customer.CustomerId, RPT_Customer.ContactPerson,
      RPT_Customer.BillingAddress, RPT_Customer.DeliveryAddress,
      RPT_Invoice_Less.OrderNumber, RPT_Invoice_Less.ShippingBy,
      RPT_Invoice_Less.ShipReferenceNo, RPT_Invoice_Less.Notes,
      RPT_Invoice_Less.Price, RPT_Invoice_Less.Discount,
      RPT_Invoice_Less.Shipping, RPT_Invoice_Less.Tax,
      RPT_Invoice_Less.GrandTotal, RPT_Invoice_Less.Company
  FROM RPT_Invoice_Less
  INNER JOIN RPT_Customer
  ON RPT_Invoice_Less.CustomerId = RPT_Customer.CustomerId;
  </code></pre>
  
  <p>this code working fine for 2 tables</p>
  
  <pre><code>SELECT RPT_Invoice_Less.InvoiceNumber, RPT_Invoice_Less.Terms, RPT_Invoice_Less.Invoicedate, RPT_Invoice_Less.OurQuote, RPT_Invoice_Less.SalesPerson, RPT_Customer.CustomerName, RPT_Customer.CustomerId, RPT_Customer.ContactPerson, RPT_Customer.BillingAddress, RPT_Customer.DeliveryAddress, RPT_Invoice_Less.OrderNumber, RPT_Invoice_Less.ShippingBy, RPT_Invoice_Less.ShipReferenceNo, RPT_Invoice_Less.Notes, RPT_Invoice_Less.Price, RPT_Invoice_Less.Discount, RPT_Invoice_Less.Shipping, RPT_Invoice_Less.Tax, RPT_Invoice_Less.GrandTotal, RPT_OrionSystem.Company, RPT_OrionSystem.CompanyId
  FROM RPT_Invoice_Less 
  INNER JOIN RPT_Customer 
  ON RPT_Invoice_Less.CustomerId = RPT_Customer.CustomerId
  INNER JOIN RPT_OrionSystem
  ON RPT_Invoice_Less.CompanyId = RPT_OrionSystem.CompanyId;
  </code></pre>
  
  <p>This code showing syntax error. </p>
  
  <p>Help me to add 3rd <em>Company</em> table to this.</p>