home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!destroyer!sol.ctr.columbia.edu!news.columbia.edu!lamont!msolda
- From: msolda@lamont.ldgo.columbia.edu (M Solda)
- Subject: Re: multiple EXISTS subqueries under Sybase 4.8
- Message-ID: <1992Nov20.144211.7644@lamont.ldgo.columbia.edu>
- Keywords: EXISTS, 4.8, sun4, sunos 4.1.1
- Sender: news@lamont.ldgo.columbia.edu
- Reply-To: msolda@lamont.ldgo.columbia.edu
- Organization: Lamont-Doherty Geological Observatory
- 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>
- Date: Fri, 20 Nov 1992 14:42:11 GMT
- Lines: 47
-
- In article <1egu5dINNmie@gazette.bcm.tmc.edu>, mparsons@fleming.csc.bcm.tmc.edu (Mark Parsons) writes:
- >
- >
- > OK, let me ask you this . . . concerning the combined EXIST and
- > NOT EXIST . . .
- >
- > If the EXIST test does not work, i.e., it's false, does the
- > NOT EXIST test come out true?
- >
- > In other words, does the NOT EXIST part work, or at least
- > get tested, if the EXIST part fails?
-
- the intention either could be true then the expression would be true. i did
- not think that if either the EXISTS not the NOT EXISTS fails, the other would
- not be tested. i would think that the converse would be true (if one is
- true, then the other is not tested), meaing short-circuit logic. but
- what appears to be happening is only the EXISTS gets evaluated. even
- changing the order of the EXISTS and the NOT EXISTS around the OR does not
- matter. the results are the same as if the NOT EXISTS was not included.
-
- > If so, the problem could be that the server is not evaluating
- > the NOT EXIST portion of the test since the EXIST portion solves your
- > overall 'OR' test, i.e., if the EXIST is true, there's no need to
- > do the NOT EXIST test.
-
- this is not the case. when the EXISTS not true, the NOT EXISTS should be
- evaluated (short circuit logic or not) and then that could be true.
-
- > In most languages the clauses that are 'connected' via an OR
- > are evaluated one at a time. As soon as one of the tests evaluates as
- > TRUE the testing is stopped since you only need one of them to be TRUE
- > for the OR to be TRUE. Similar logic says that testing on clauses
- > 'connected' by an AND will halt as soon as one of the tests comes up
- > FALSE; reason being that all clauses must be TRUE for the AND to be
- > TRUE soooooo, if any one of them comes up FALSE the entire AND is
- > FALSE and no more testing is needed.
-
- i agree with this statement.
-
- > Does that shed any light on the problem? Or am I beating a dead horse? ;-)
- >
- > Comments from others that have 'played' with this?
-
- sorry, it does not on my end, though i may be being very dense. does any one
- know if this is a know bug?
-
- msolda
-