Received: from mta6.snfc21.pbi.net (mta6.snfc21.pbi.net [206.13.28.240]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1JIWAE54277 for ; Tue, 19 Feb 2002 13:32:11 -0500 (EST) (envelope-from benoitm@pacbell.net) Received: from osprey ([209.232.53.52]) by mta6.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GRS000JPM5LKP@mta6.snfc21.pbi.net> for pgsql-sql@postgresql.org; Tue, 19 Feb 2002 10:32:10 -0800 (PST) Date: Tue, 19 Feb 2002 10:32:06 -0800 From: Benoit Menendez Subject: Problem with self-join updates... To: pgsql-sql@postgresql.org Message-id: <002b01c1b973$bf48c740$0201a8c0@osprey> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Mailer: Microsoft Outlook Express 6.00.2600.0000 Content-type: multipart/alternative; boundary="Boundary_(ID_N/eZgfhdhbaSED+1fpQkig)" X-Priority: 3 X-MSMail-priority: Normal References: <002101c1b650$18f087a0$0201a8c0@osprey> X-Archive-Number: 200202/239 X-Sequence-Number: 6663 This is a multi-part message in MIME format. --Boundary_(ID_N/eZgfhdhbaSED+1fpQkig) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Can someone please help? Benoit ----- Original Message ----- From: Benoit Menendez To: pgsql-sql@postgresql.org Sent: Friday, February 15, 2002 10:39 AM Subject: [SQL] Problem with self-join updates... I have the following self-join update: update TABLE set PARENT_ID=parent.PARENT_ID from TABLE, TABLE parent where TABLE.PARENT_ID=parent.ID and parent.ID in (1,2,3,4) This query is use to update a hierarchy before deleting specific records... I get the following error: Table name "table" specified more than once This appears to be a limitation of the update syntax which is not documented... Is this something that will be fixed soon? or should I write this query differently? Any suggestions? Thanks for your help. Benoit --Boundary_(ID_N/eZgfhdhbaSED+1fpQkig) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT
Can someone please help?
 
    Benoit
----- Original Message -----
From: Benoit Menendez
To: pgsql-sql@postgresql.org
Sent: Friday, February 15, 2002 10:39 AM
Subject: [SQL] Problem with self-join updates...

I have the following self-join update:
 
            update TABLE set PARENT_ID=parent.PARENT_ID
            from TABLE, TABLE parent
            where TABLE.PARENT_ID=parent.ID
            and parent.ID in (1,2,3,4)
This query is use to update a hierarchy before deleting specific records...
 
I get the following error:
 
    Table name "table" specified more than once
 
This appears to be a limitation of the update syntax which is not documented...
 
Is this something that will be fixed soon? or should I write this query differently?
 
Any suggestions?
 
Thanks for your help.
 
    Benoit
--Boundary_(ID_N/eZgfhdhbaSED+1fpQkig)--