home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / sybase / 370 < prev    next >
Encoding:
Text File  |  1992-11-20  |  2.9 KB  |  61 lines

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