By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,335 Members | 2,281 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,335 IT Pros & Developers. It's quick & easy.

Many to Many query help!

P: n/a
Hello,

I have set up my database in access using many to many relationships (it's
the good ol' books and authors one again). I've actually extended it to
include other people who contribute in various ways to the books (e.g.
editors, illustrators etc), so there's more than one many to many
relationship there.

When there's an entry in all the tables relating to the book I want to view,
everything works fine (i.e. there's an author in the author table, an
illustrator in the illustrator table, an editor in the editor table) - my
join tables do their job and there's no problem.

However... when there's say no an illustrator in the illustrator table
relating to the book, I get nothing back at all from my query, no book
details or author.

When I do one to many joins usually changing the sql to use LEFT JOINs
instead of INNER JOINs does the trick, but when I try this here Access tells
me "Join Expression Not Supported".

Any help would be much appreciated. I can post the SQL if it helps.

Thanks,
Phil
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Phil W.,
The orthodox many-to-many involves three tables. Two of them are the
entities being joined and the third is a two column intersection entity
detailing the instances of the first two entities that are joined. Widget A
is a component of Widgets C, N & P and consists of Widgets B, F, & I, for
example. Brighter lights here with better memories can tell you why it is
considered bad practice to directly join more than one intersection entity
or to have more than two attributes in an intersection entity.
Were I able to design your schema I'd have Books, People & Contribution as
attributes of my intersection entity. That way I can list all my
permutations of a book, a person and the person's role in the book. Given
the four tables--Books, People, Role, & Intersection Entity--I can then
query this and find all the people with a role for a book, all the books a
person had a role in . . . and much more.

"Phil W" <yo******************@hotmail.com> wrote in message
news:41**********@mk-nntp-1.news.uk.worldonline.com...
Hello,

I have set up my database in access using many to many relationships (it's
the good ol' books and authors one again). I've actually extended it to
include other people who contribute in various ways to the books (e.g.
editors, illustrators etc), so there's more than one many to many
relationship there.

When there's an entry in all the tables relating to the book I want to
view,
everything works fine (i.e. there's an author in the author table, an
illustrator in the illustrator table, an editor in the editor table) - my
join tables do their job and there's no problem.

However... when there's say no an illustrator in the illustrator table
relating to the book, I get nothing back at all from my query, no book
details or author.

When I do one to many joins usually changing the sql to use LEFT JOINs
instead of INNER JOINs does the trick, but when I try this here Access
tells
me "Join Expression Not Supported".

Any help would be much appreciated. I can post the SQL if it helps.

Thanks,
Phil

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.