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 9FF679DC833 for ; Mon, 6 Mar 2006 10:10:55 -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 23692-08 for ; Mon, 6 Mar 2006 10:10:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by postgresql.org (Postfix) with ESMTP id AC7459DC81D for ; Mon, 6 Mar 2006 10:10:52 -0400 (AST) Received: from [213.162.97.75] (helo=mail.metronet.co.uk) by ptb-relay01.plus.net with esmtp (Exim) id 1FGGQF-0003TW-U3; Mon, 06 Mar 2006 14:10:52 +0000 Received: from mainbox.archonet.com (unknown [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 0491C40742C; Mon, 6 Mar 2006 13:55:09 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id B42C2FF04; Mon, 6 Mar 2006 13:55:08 +0000 (GMT) Message-ID: <440C3F3C.8030307@archonet.com> Date: Mon, 06 Mar 2006 13:55:08 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Thomas Beutin Cc: pgsql-sql@postgresql.org Subject: Re: Help with "missing FROM clause" needed References: <440C3860.8060200@laokoon.IN-Berlin.DE> In-Reply-To: <440C3860.8060200@laokoon.IN-Berlin.DE> 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.122 required=5 tests=[AWL=0.122] X-Spam-Score: 0.122 X-Spam-Level: X-Archive-Number: 200603/114 X-Sequence-Number: 24460 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? -- Richard Huxton Archonet Ltd