D
David Wetmore
In an M2M relationship between headers and quads I
wish to select the header keys & names where the header record
contains both of two quadkeys (CKey) from the join table, tblQuadsJoin.
I've been trying to do this with an inner join on an inner join
but the SQL below doesn't work.
SELECT tblHeaders.HKey, tblHeaders.Name
FROM tblHeaders
(INNER JOIN tblQuadsJoin
ON tblHeaders.HKey = tblQuadsJoin.PKey
WHERE tblQuadsJoin.CKey = 61)
INNER JOIN tblQuadsJoin
ON tblHeaders.HKey = tblQuadsJoin.PKey
WHERE tblQuadsJoin.CKey = 84
Am I on the right track or do I need to build an intermediate table
based on the first join and then do the second join on the intermediate table?
Thanks, Dave
wish to select the header keys & names where the header record
contains both of two quadkeys (CKey) from the join table, tblQuadsJoin.
I've been trying to do this with an inner join on an inner join
but the SQL below doesn't work.
SELECT tblHeaders.HKey, tblHeaders.Name
FROM tblHeaders
(INNER JOIN tblQuadsJoin
ON tblHeaders.HKey = tblQuadsJoin.PKey
WHERE tblQuadsJoin.CKey = 61)
INNER JOIN tblQuadsJoin
ON tblHeaders.HKey = tblQuadsJoin.PKey
WHERE tblQuadsJoin.CKey = 84
Am I on the right track or do I need to build an intermediate table
based on the first join and then do the second join on the intermediate table?
Thanks, Dave