Re: Help with "missing FROM clause" needed

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 14:51:38
Message-ID: 20060306145138.GK29842@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

am 06.03.2006, um 15:27:54 +0100 mailte Thomas Beutin folgendes:
> >>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';
> >DELETE FROM partner_zu
> >WHERE
> > partner_zu.m_id = '25'
> > ...etc...
> > AND partner_zu.pa_id IN (
> > SELECT id FROM partner WHERE open='m' AND a_id='104335887112347'
> > )
> >Does that work for you?
> What should i do with the "AND partner.a_id = partner_zu.a_id" ? Without
> this it would be working fine.

*untested*

DELETE FROM partner_zu using partner
WHERE partner_zu.pa_id = partner.id
...

The point is the 'using ...'

Btw.: where is my other mail?

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Emil Rachovsky 2006-03-06 15:21:58 Syntax error in Execute statement
Previous Message Thomas Beutin 2006-03-06 14:27:54 Re: Help with "missing FROM clause" needed