| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Help with "missing FROM clause" needed |
| Date: | 2006-03-06 13:57:35 |
| Message-ID: | 20060306135735.GJ29842@webserv.wug-glas.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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 ===
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Beutin | 2006-03-06 14:27:54 | Re: Help with "missing FROM clause" needed |
| Previous Message | Richard Huxton | 2006-03-06 13:55:08 | Re: Help with "missing FROM clause" needed |