query help needed


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
 
Ad

Advertisements

D

Duane Hookom

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.
 
J

JohnE

Cartesian query? I'll be googling that to see what and how it is. Never
heard that term before.
Thanks for the info.
John
 
K

KARL DEWEY

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.
 
Ad

Advertisements

D

Duane Hookom

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Not showing repeated records 2
inserting table subsets 1
delete Using Join Statement 4
Delete using join statement 4
Query Joins 2
Query with several tables. 5
extraction. 2
Entity Splitting question 3

Top