Warren Little <[EMAIL PROTECTED]> writes: > Look at the following two queries. > ... > and not exists (select pid from casecombo where casepid = secondpid) > ... > and casepid not in (select secondpid from casecombo)
> The second query is broken and I don't understand why. I'll bet there are some NULL values for secondpid in casecombo. The behavior of NOT IN with NULLs is fairly unintuitive :-( regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org