home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / sybase / 321 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  1.8 KB

  1. Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!wupost!cs.utexas.edu!sun-barr!rutgers!news.columbia.edu!lamont!msolda
  2. From: msolda@lamont.ldgo.columbia.edu (M Solda)
  3. Newsgroups: comp.databases.sybase
  4. Subject: Re: multiple EXISTS subqueries under Sybase 4.8
  5. Keywords: EXISTS, 4.8, sun4, sunos 4.1.1
  6. Message-ID: <1992Nov15.225853.2269@lamont.ldgo.columbia.edu>
  7. Date: 15 Nov 92 22:58:53 GMT
  8. References: <1992Nov14.174847.29576@lamont.ldgo.columbia.edu> <1992Nov15.144258.18635@panix.com>
  9. Sender: news@lamont.ldgo.columbia.edu
  10. Reply-To: msolda@lamont.ldgo.columbia.edu
  11. Organization: Lamont-Doherty Geological Observatory
  12. Lines: 25
  13.  
  14. In article <1992Nov15.144258.18635@panix.com>, dbenua@panix.com (David Benua) writes:
  15. > In <1992Nov14.174847.29576@lamont.ldgo.columbia.edu> msolda@lamont.ldgo.columbia.edu (M Solda) writes:
  16. > >does anyone know if there is a limitation in the number of EXIST subqueries
  17. > >that can be in a single query?  i have a query with an EXISTS and a NOT EXISTS
  18. > >joined by an OR, but only the rows that meet the EXISTS criteria are reported.
  19. > >a separate query for each EXISTS provided the correct answer in each case.
  20. > >am i breaking syntax somewhere?
  21. > I've had the same problem with 2 EXISTS in the same subquery, I got around it
  22. > by transforming the OR into an AND (DeMorganizing) and reversing the logic.
  23. > But, of course, this will not work in all cases (or even most cases).
  24.  
  25. just to follow up, after posting my original article, i solved the problem by
  26. using a UNION operator to join the results into to identical queries, except 
  27. of course, for the EXISTS clauses.
  28.  
  29. i did try "transforming the OR into an AND", but as Dave points out, this would
  30. not work in all cases and this was such a case.
  31.  
  32. anybody know if this is a reported bug?
  33.  
  34. msolda
  35.