Help with "missing FROM clause" needed - Mailing list pgsql-sql

From Thomas Beutin
Subject Help with "missing FROM clause" needed
Date
Msg-id 440C3860.8060200@laokoon.IN-Berlin.DE
Whole thread Raw
Responses Re: Help with "missing FROM clause" needed
Re: Help with "missing FROM clause" needed
List pgsql-sql
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?"


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: [GENERAL] problem with overloading the "coalesce" function
Next
From: "A. Kretschmer"
Date:
Subject: Re: Help with "missing FROM clause" needed