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

  1. Newsgroups: comp.databases.sybase
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!sunova!higgs.ssc.gov!jbaron
  3. From: jbaron@higgs.ssc.gov (Jeff Baron)
  4. Subject: Re: multiple EXISTS subqueries under Sybase 4.8
  5. Message-ID: <1992Nov20.194501.2595@sunova.ssc.gov>
  6. Keywords: EXISTS, 4.8, sun4, sunos 4.1.1
  7. Sender: usenet@sunova.ssc.gov (News Admin)
  8. Nntp-Posting-Host: higgs.ssc.gov
  9. Reply-To: jbaron@higgs.ssc.gov (Jeff Baron)
  10. Organization: Superconducting Super Collider Lab
  11. 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>
  12. Date: Fri, 20 Nov 1992 19:45:01 GMT
  13. Lines: 23
  14.  
  15. [problems with exists and not exists]
  16.  
  17. I've had this problem too, the first time, about three years ago.
  18. [Hard to believe it's still around.]
  19.  
  20. In any event, in my case, the problem had to do with a statement
  21. that also consited of multiple 'exists' expressions separated by
  22. or's.  For example,
  23.  
  24.     if ((exists (select colname1 from table1 where condition1))
  25.             or (exists (select colname2 from table2 where condition2)))
  26.         begin
  27.             statement
  28.         end
  29.  
  30. When table1 was empty, the first part of the condition should
  31. return false, of course.  In fact it may have, but this 'emptiness'
  32. caused the large, multiple condition, regardless of the other parts, to
  33. return false as well, and 'statement' was never executed.
  34.  
  35. --
  36. Jeff Baron
  37. jbaron@gauss.ssc.gov
  38.