query help needed

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

There is a report that is to show all statuses whether their is info
associated with a status or not. Let me see if I can set the ground work.
Will give simple names for easier explaining.

TableA - Main table that has all the data in it. This is also the many side
since the other 4 tables are used in comboboxes on a form that populates the
main table. Three fields on the report come from this table.

TableB - Name table. One field from here on the report. This is a 1 to
TableA many.

TableC - Status table. Same here as TableB. This is also the table that
has the different statuses in it that need to show on the report.

TableD - Project Lead table. Same here as TableB.

TableE - Developer table. Same here as TableB.

I can get the statuses that are associated with info from TableA but I need
to show all statuses even if nothing from TableA matches.

Can someone assist with this.
Thanks.
John
 
If I understand correctly, you can create a cartesian query that selects the
primary keys from both TableA and TableC. Then use this query with a LEFT or
RIGHT JOIN in your final query so all records are returned from the cartesian
query.
 
Cartesian query? I'll be googling that to see what and how it is. Never
heard that term before.
Thanks for the info.
John
 
You only related TableB to TableA in a one to many relationship. What are
the relations of the other tables?
Post your table field names and datatype and how they replate to the other
tables.
Post sample data from the tables.
 
The query SQL might look something like:
SELECT PKFldA, StatusID
FROM TableA, TableC;

This should display every unique combination of primary key values from
TableA and TableC.
 
Back
Top