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 AC3469DCCB3 for ; Mon, 6 Mar 2006 09:34:10 -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 17354-10 for ; Mon, 6 Mar 2006 09:34:14 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A51DD9DCC4C for ; Mon, 6 Mar 2006 09:34:08 -0400 (AST) Received: from laokoon.in-berlin.de (port-87-234-205-226.static.qsc.de [87.234.205.226]) by svr4.postgresql.org (Postfix) with ESMTP id 95A4C5AF0CC for ; Mon, 6 Mar 2006 13:34:12 +0000 (GMT) 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 k26DY7q9010528 for ; Mon, 6 Mar 2006 14:34:07 +0100 Message-ID: <440C3860.8060200@laokoon.IN-Berlin.DE> Date: Mon, 06 Mar 2006 14:25:52 +0100 From: Thomas Beutin User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051014) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Help with "missing FROM clause" needed 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 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/112 X-Sequence-Number: 24458 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'; I need to delete some entries in partner_zu but the decision which to delete is to be made by an entry in the table partner. There is no foreign key from partner_zu to partner (bad design, i know...) and i need a single (and hopefully performant) statement to do the job. Any help is gratefully appreciated! -tb -- Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"