X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DC0F89FB21E for ; Wed, 23 Aug 2006 11:57:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 97617-01 for ; Wed, 23 Aug 2006 11:57:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from myemma.com (db1.e2ma.net [66.179.147.163]) by postgresql.org (Postfix) with ESMTP id 54E8C9FB1EF for ; Wed, 23 Aug 2006 11:57:50 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by myemma.com (Postfix) with ESMTP id 0E13823CEA; Wed, 23 Aug 2006 10:01:31 -0500 (CDT) Received: from myemma.com ([127.0.0.1]) by localhost (velma [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22380-10; Wed, 23 Aug 2006 10:01:30 -0500 (CDT) Received: from [10.0.23.16] (unknown [205.241.239.26]) by myemma.com (Postfix) with ESMTP id 484FF23CE6; Wed, 23 Aug 2006 10:01:27 -0500 (CDT) Message-ID: <44EC6CE9.70809@myemma.com> Date: Wed, 23 Aug 2006 09:57:45 -0500 From: Erik Jones User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: chrisj Cc: pgsql-sql@postgresql.org Subject: Re: error with mor than 1 sub-select References: <5936948.post@talk.nabble.com> <20060823020643.GA60275@winnie.fuhr.org> <5937248.post@talk.nabble.com> In-Reply-To: <5937248.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at myemma.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.184 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/163 X-Sequence-Number: 26121 Actually, it pointed you right to it. Notice that exits is just before where the pointer was. chrisj wrote: > thanks, stupid user error. > > i guess the pointer on the error message led me astray > > > Michael Fuhr wrote: > >> On Tue, Aug 22, 2006 at 06:47:51PM -0700, chrisj wrote: >> >>> The first query works fine, but when a second sub-query is added I get a >>> syntax error... >>> >>> psql protocal2 -U p2user << EOF1 >>> select * >>> from serv_res SR >>> where serv_key = 10 >>> and not exists >>> (select 1 >>> from reservation R >>> ) >>> -- and not exits >>> >> Does the real query have "exits" instead of "exists"? I created >> some test tables and fixed that typo and then both queries worked. >> >> -- >> Michael Fuhr >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 4: Have you searched our list archives? >> >> http://archives.postgresql.org >> >> >> > > -- erik jones software development emma(r)