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