From: | Thomas Beutin <psql(at)laokoon(dot)IN-Berlin(dot)DE> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Help with "missing FROM clause" needed |
Date: | 2006-03-06 13:25:52 |
Message-ID: | 440C3860.8060200@laokoon.IN-Berlin.DE |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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?"
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2006-03-06 13:55:08 | Re: Help with "missing FROM clause" needed |
Previous Message | Richard Huxton | 2006-03-06 11:29:56 | Re: problem with overloading the "coalesce" function |