home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!sunova!higgs.ssc.gov!jbaron
- From: jbaron@higgs.ssc.gov (Jeff Baron)
- Subject: Re: multiple EXISTS subqueries under Sybase 4.8
- Message-ID: <1992Nov20.194501.2595@sunova.ssc.gov>
- Keywords: EXISTS, 4.8, sun4, sunos 4.1.1
- Sender: usenet@sunova.ssc.gov (News Admin)
- Nntp-Posting-Host: higgs.ssc.gov
- Reply-To: jbaron@higgs.ssc.gov (Jeff Baron)
- Organization: Superconducting Super Collider Lab
- References: <1992Nov14.174847.29576@lamont.ldgo.columbia.edu> <1992Nov15.144258.18635@panix.com> <1992Nov15.225853.2269@lamont.ldgo.columbia.edu> <1e8fj7INN1sg@gazette.bcm.tmc.edu> <1992Nov16.184540.11698@lamont.ldgo.columbia.edu> <1ee852INN90m@gazette.bcm.tmc.edu> <1992Nov19.174435.25700@lamont.ldgo.columbia.edu> <1egu5dINNmie@gazette.bcm.tmc.edu> <1992Nov20.144211.7644@lamont.ldgo.columbia.edu>
- Date: Fri, 20 Nov 1992 19:45:01 GMT
- Lines: 23
-
- [problems with exists and not exists]
-
- I've had this problem too, the first time, about three years ago.
- [Hard to believe it's still around.]
-
- In any event, in my case, the problem had to do with a statement
- that also consited of multiple 'exists' expressions separated by
- or's. For example,
-
- if ((exists (select colname1 from table1 where condition1))
- or (exists (select colname2 from table2 where condition2)))
- begin
- statement
- end
-
- When table1 was empty, the first part of the condition should
- return false, of course. In fact it may have, but this 'emptiness'
- caused the large, multiple condition, regardless of the other parts, to
- return false as well, and 'statement' was never executed.
-
- --
- Jeff Baron
- jbaron@gauss.ssc.gov
-