pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Beutin <psql@laokoon.IN-Berlin.DE>
To: pgsql-sql@postgresql.org
Subject: Help with "missing FROM clause" needed
Date: Mon, 06 Mar 2006 14:25:52 +0100
Message-ID: <440C3860.8060200@laokoon.IN-Berlin.DE> (raw)

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?"



view thread (6+ messages)  latest in thread

Message-ID: <440C3860.8060200@laokoon.IN-Berlin.DE>
Permalink:  ../440C3860.8060200@laokoon.IN-Berlin.DE/
Also on:    postgresql.org/message-id/440C3860.8060200@laokoon.IN-Berlin.DE

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: psql@laokoon.IN-Berlin.DE
  Subject: Re: Help with "missing FROM clause" needed
  In-Reply-To: <440C3860.8060200@laokoon.IN-Berlin.DE>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox