I have a foreign key table for defining many to many relationships in two other tables.
This table (MapTable) has two foreign keys, aID and bID.
MapTable
aID | bID
I start the query knowing 2 different aIDs that are related in different rows to many different bIDs. I want to find which bIDs they have in common.. Only the ones they have in common.
And then hopefully in the same query (or subquery) i want to find all the aIDs ( minus the two i started with) that also match the found bIDs. All the aIDs returned must match every bID found.
...arrgg it sounds so simple.
I've done a lot of reading and experimenting with no success.... Can anybody point me in the right direction? I'll post my attempts if i get close but after two days i don't have much to show :p
Thanks!
BugBoy