Article View: borland.public.interbase.sql
Article #516Re: Using EXISTS in views crashed IB (6.0)??
From: Karol Bieniaszewski
Date: Wed, 14 Nov 2007 07:30
Date: Wed, 14 Nov 2007 07:30
43 lines
2770 bytes
2770 bytes
U�ytkownik "Arjan de Haan" <2x nospam nospam adwhaan AT hotpop.com> napisa� w wiadomo�ci news:473a11f4@newsgroups.borland.com... > Hi. > > We have an existing installation of IB Server 6 which I was updating to > incorporate some new views. When testing I ran across the following > problem. > I have a view, which results depend on the existing of matching data in > another view, like this: > > SELECT Locaties.LocatieOID, Locaties.Verwijderd, Locaties.Naam, > Locaties.Tellergebruik, Locaties.Tellersaan, Klanten.KlantOID, > Klanten.Naam, Adressen.Plaats > FROM ((Locaties INNER JOIN Klanten ON Locaties.KlantOID = > Klanten.KlantOID) > INNER JOIN Adressen ON Locaties.AdresOID = > Adressen.AdresOID) > WHERE > (EXISTS (SELECT TijdelijkOID FROM Tijdelijk > WHERE (Tijdelijk.LocatieOID = Locaties.LocatieOID))) > OR > (EXISTS (SELECT LOCATIEOID FROM VIEWLOCAUTMCOUNT > WHERE VIEWLOCAUTMCOUNT.LocatieOID = Locaties.LocatieOID)) > > This query works, as long as i remove the EXISTS(....) on the > ViewLocAutmCount from the query. If it is used, even trying to explain the > query (retrieving the plan) crashes IB!! > To explain the query (or what I'm trying to do): I need locations, but > only those that have either a reference from another table (Tijdelijk), or > where equipment is placed (ViewLocAutmCount, which lists the number of > appliances placed at a location). > > Anybody can show me what I'm doing wrong? Can't IB 6 handle referencing > views from within views?? > Tx. > ...Arjan... > this is so old version of interbase - upgrade it or use Firebird Karol Bieniaszewski
Technical Details
Message-ID:
<473aa1c9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!198.186.194.247.MISMATCH!news-out.readnews.com!news-xxxfer.readnews.com!ucberkeley!news-hog.berkeley.edu!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<473a11f4@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,2745675ecdb62401 X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII From: "Karol Bieniaszewski" <liviuslivius@poczta.onet.pl> Newsgroups: borland.public.interbase.sql References: <473a11f4@newsgroups.borland.com> Subject: Re: Using EXISTS in views crashed IB (6.0)?? Date: Wed, 14 Nov 2007 08:30:07 +0100 Lines: 45 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 NNTP-Posting-Host: 195.205.151.58 Message-ID: <473aa1c9@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1195024841 195.205.151.58 (13 Nov 2007 23:20:41 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!198.186.194.247.MISMATCH!news-out.readnews.com!news-xxxfer.readnews.com!ucberkeley!news-hog.berkeley.edu!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail