I've searched the forum regarding why a query wouldn't return data. So far, I have not been able to solve my problem. I know there's probably an easy solution that I'm overlooking.
The problem is when I'm querying tables that have many-to-many relationships, where I've created join tables.
Here's an example:
Author_tbl
AuthorID autonumber/primary key
AuthorName text
OrganizationID number - foreign key to Organization_tbl
Organization_tbl
OrganizationID autonumber/primary key
AuthorOrganization_tbl (join table)
AuthorID number/primary key (foreign to Author_tbl)
OrganizationID number/primary key (foreign to Organization_tbl)
The query needs to produce:
Authors and all organizations associated with them (there will definitely be more than one - thus the need for the many-to-many relationship)
Organizations and all Authors associated with them (same reason as above for many-to-many relationship).
I've tried a few different queries, but getting no data. MAIN QUESTION: Should I be using the Author_tbl and AuthorOrganization_tbl OR the Author_tbl and Organization_tbl to design the query?
If anyone has any insight, I'd really appreciate it. I've been getting help from another forum (Tables and Relationships), but I can't seem to get this problem worked out.
Thank you.
The problem is when I'm querying tables that have many-to-many relationships, where I've created join tables.
Here's an example:
Author_tbl
AuthorID autonumber/primary key
AuthorName text
OrganizationID number - foreign key to Organization_tbl
Organization_tbl
OrganizationID autonumber/primary key
AuthorOrganization_tbl (join table)
AuthorID number/primary key (foreign to Author_tbl)
OrganizationID number/primary key (foreign to Organization_tbl)
The query needs to produce:
Authors and all organizations associated with them (there will definitely be more than one - thus the need for the many-to-many relationship)
Organizations and all Authors associated with them (same reason as above for many-to-many relationship).
I've tried a few different queries, but getting no data. MAIN QUESTION: Should I be using the Author_tbl and AuthorOrganization_tbl OR the Author_tbl and Organization_tbl to design the query?
If anyone has any insight, I'd really appreciate it. I've been getting help from another forum (Tables and Relationships), but I can't seem to get this problem worked out.
Thank you.