pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-sql@postgresql.org
Subject: Re: Help with "missing FROM clause" needed
Date: Mon, 6 Mar 2006 14:57:35 +0100
Message-ID: <20060306135735.GJ29842@webserv.wug-glas.de> (raw)
In-Reply-To: <440C3860.8060200@laokoon.IN-Berlin.DE>
References: <440C3860.8060200@laokoon.IN-Berlin.DE>

am  06.03.2006, um 14:25:52 +0100 mailte Thomas Beutin folgendes:
> 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';

*untested*

delete from partner_zu using partner ...


Example:

test=# delete from only f1 where f1.id = f2.id ;
ERROR:  missing FROM-clause entry for table "f2"

but:

test=# delete from only f1 using f2 where f1.id = f2.id ;
DELETE 0


Hint: read
http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.html



HTH, Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    === 



view thread (6+ messages)  latest in thread

Message-ID: <20060306135735.GJ29842@webserv.wug-glas.de>
Permalink:  ../20060306135735.GJ29842@webserv.wug-glas.de/
Also on:    postgresql.org/message-id/20060306135735.GJ29842@webserv.wug-glas.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: andreas.kretschmer@schollglas.com
  Subject: Re: Help with "missing FROM clause" needed
  In-Reply-To: <20060306135735.GJ29842@webserv.wug-glas.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