S
Sparky
I have a Person table, with one entry per person. I have
a Car table with one entry per car. I have a PersonCar
table, one entry per person per car owned.
If I wanted to return a list of all people who had a Ford
AND a VW... how can I do that?
In effect, I can drop the Car table from the query, and
do something like:
SELECT tblPerson.*
FROM tblPerson
INNER JOIN
PersonCar ON
Person.[id] = PersonCar.PersonID
But the Where is an issue - if I do a Where
PersonCar.CarID="VW" AND PersonCar.CarID="Ford",
obviously no Person entries will be returned, but if I do
an OR, I'll get people who have either, but not
exclusivly those who only have both.
Seems like an easy one but it's got me stumped! Any help
much appreciated!
Sparky
a Car table with one entry per car. I have a PersonCar
table, one entry per person per car owned.
If I wanted to return a list of all people who had a Ford
AND a VW... how can I do that?
In effect, I can drop the Car table from the query, and
do something like:
SELECT tblPerson.*
FROM tblPerson
INNER JOIN
PersonCar ON
Person.[id] = PersonCar.PersonID
But the Where is an issue - if I do a Where
PersonCar.CarID="VW" AND PersonCar.CarID="Ford",
obviously no Person entries will be returned, but if I do
an OR, I'll get people who have either, but not
exclusivly those who only have both.
Seems like an easy one but it's got me stumped! Any help
much appreciated!
Sparky