Home » SQL & PL/SQL » SQL & PL/SQL » Re: What is wrong with my logic?
Re: What is wrong with my logic? [message #39033] Fri, 07 June 2002 21:01
sverch
Messages: 582
Registered: December 2000
Senior Member
I know you did. I did to. I was in a hurry and I was not as clear as I could have been.

I meant to say that I tried to do a stupid, albeit, logically reasonable, thing when I listed table#3 in the FROM clause:
SELECT a,b,c
FROM
tbl x,
tbl y,
tbl r
WHERE x.key=y.key
AND r is empty.
This did not work and it worked only when I exclude r
from WHERE. That was what I meant yesterday.

SELECT a,b,c
FROM
bl x,
tbl y
WHERE x.key=y.key
AND NOT EXISTS (SELECT 'x'...)

But I am still curious.
If I want a, b and c from three tables WHERE two tables match and the third is empty why I do not get any records in return? Am I missing something? I do not want any records from table#3,I only want to know that it has no records.
Previous Topic: Urgent help needed on SChema Level Triggers
Next Topic: imp question
Goto Forum:
  


Current Time: Tue Apr 16 01:40:17 CDT 2024