G
Guest
I can't seem to get EXISTS to work in Access queries... Here's an example...
SELECT S.S, P.P
FROM S, P
where Exists (SELECT DISTINCT SPJ.S, SPJ.P
FROM SPJ);
I expected this to do a Cartesian Product of S and P but then only give me
those S and P combinations that are in SPJ.
I really want those combinations of S and P that are not in SPJ. But if I
do..
SELECT S.S, P.P
FROM S, P
where NOT Exists (SELECT DISTINCT SPJ.S, SPJ.P
FROM SPJ)
;
It returns nothing.
SELECT S.S, P.P
FROM S, P
where Exists (SELECT DISTINCT SPJ.S, SPJ.P
FROM SPJ);
I expected this to do a Cartesian Product of S and P but then only give me
those S and P combinations that are in SPJ.
I really want those combinations of S and P that are not in SPJ. But if I
do..
SELECT S.S, P.P
FROM S, P
where NOT Exists (SELECT DISTINCT SPJ.S, SPJ.P
FROM SPJ)
;
It returns nothing.