I am trying to build a database by MS access 2010 for Animal Import Control Ports. I have three tables names are: Importers, Consignments, Staff, and one table named tbgroup (ID, importer ID, consignment ID, and Staff ID).
The problem is when I relate the primary key (the IDs) of each table with the tbgroup table, and run it in a query it dosen't retrieve any data from those tables.
What is wrong with this query?
This is the SQL Statement for my query:
Please any idea on how to build a good relationship for this database?
Database is attached for more digestion.
Thanks
The problem is when I relate the primary key (the IDs) of each table with the tbgroup table, and run it in a query it dosen't retrieve any data from those tables.
What is wrong with this query?
This is the SQL Statement for my query:
SELECT tbgroup.[Importer ID], Importers.[Importer Name], Importers.[Phone Number], tbgroup.[Consignment ID], Consignments.[Date of Arrival], Consignments.[Consignment type], Consignments.Gender, Consignments.Qty, tbgroup.[Staff ID], Staff.[Staff Name], Staff.[Job Title], Staff.[Contact Number] FROM Staff INNER JOIN (Importers INNER JOIN (Consignments INNER JOIN tbgroup ON Consignments.[Consignment ID] = tbgroup.[Consignment ID]) ON Importers.[Importer ID] = tbgroup.[Importer ID]) ON Staff.[Staff ID] = tbgroup.[Staff ID];
Please any idea on how to build a good relationship for this database?
Database is attached for more digestion.
Thanks
Attachments
Last edited: