X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 75BFA9DC9B7 for ; Mon, 6 Mar 2006 10:36:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29148-02 for ; Mon, 6 Mar 2006 10:36:12 -0400 (AST) X-Greylist: delayed 01:02:01.09762 by SQLgrey- Received: from laokoon.in-berlin.de (port-87-234-205-226.static.qsc.de [87.234.205.226]) by postgresql.org (Postfix) with ESMTP id 0BD709DC94B for ; Mon, 6 Mar 2006 10:36:05 -0400 (AST) Received: from [192.168.5.55] (tb.x10.wlan.bug.local [192.168.5.55]) by laokoon.in-berlin.de (8.13.4/8.13.4) with ESMTP id k26Ea9L9011228 for ; Mon, 6 Mar 2006 15:36:09 +0100 Message-ID: <440C46EA.4070504@laokoon.IN-Berlin.DE> Date: Mon, 06 Mar 2006 15:27:54 +0100 From: Thomas Beutin User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051014) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: pgsql-sql@postgresql.org Subject: Re: Help with "missing FROM clause" needed References: <440C3860.8060200@laokoon.IN-Berlin.DE> <440C3F3C.8030307@archonet.com> In-Reply-To: <440C3F3C.8030307@archonet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.214 required=5 tests=[AWL=0.025, MISSING_HEADERS=0.189] X-Spam-Score: 0.214 X-Spam-Level: X-Archive-Number: 200603/115 X-Sequence-Number: 24461 Richard Huxton wrote: > Thomas Beutin wrote: > >> Hi, >> >> to be compatible with the postgres standard syntax in 8.1.x i need >> some help for rewriting my "delete" statements ("select" is not a >> problem). I use the following statement: >> >> DELETE FROM partner_zu >> WHERE partner_zu.pa_id = partner.id >> AND partner_zu.m_id = '25' >> AND partner.open = 'm' >> AND partner.a_id = partner_zu.a_id >> AND partner_zu.a_id = '104335887112347'; > > > DELETE FROM partner_zu > WHERE > partner_zu.m_id = '25' > ...etc... > AND partner_zu.pa_id IN ( > SELECT id FROM partner WHERE open='m' AND a_id='104335887112347' > ) > > Does that work for you? What should i do with the "AND partner.a_id = partner_zu.a_id" ? Without this it would be working fine. Greetings, -tb -- Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"