[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

MS Access JOIN Query

Good Day Experts

Perhaps you all can assist me as my MS Access query building experience is rather light.  
I have three tables that I am working with...InvoiceHeader, InvoiceDetail and Address.
I am interested in getting all of the data fron the InvoiceDetail table for each InvoiceHeader record.  InvoiceNumber is the common field between the two tables.  In the InvoiceHeader and Address tables, I have a field names StoreNumber.  I want to get the address information from the Address table.  

Conceptually this seems doable:
1)Get InvoiceDetail records based on InvoiceHeader.InvoiceNumber
2)Get Address records based on InvoiceHeader.StoreNumber

I do ok when not trying to do the Address table.  But, I am not sure how to do it to get the address  table data.

Any helpful hints or insight is appreciated,
1 Solution
SharathData EngineerCommented:
Are you looking for this?
  FROM ((InvoiceHeader 
         INNER JOIN InvoiceDetail 
           ON InvoiceHeader.InvoiceNumber = InvoiceDetail.InvoiceNumber) 
        INNER JOIN Address 
          ON InvoiceHeader.StoreNumber = Address.StoreNumber)

Open in new window

Jimbo99999Author Commented:
Oh...I did not know of that technique with the inner join in the inner join.  Thanks, I will try it in the morning.


Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Tackle projects and never again get stuck behind a technical roadblock.
Join Now