From: | Benoit Menendez <benoitm(at)pacbell(dot)net> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Problem with self-join updates... |
Date: | 2002-02-19 18:32:06 |
Message-ID: | 002b01c1b973$bf48c740$0201a8c0@osprey |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Can someone please help?
Benoit
----- Original Message -----
From: Benoit Menendez
To: pgsql-sql(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Marden | 2002-02-19 18:41:23 | Dates and year 2000 |
Previous Message | Marius Andreiana | 2002-02-19 17:14:44 | Re: Postgres vs. Mysql |