update set x=(subquery on same table)

Поиск
Список
Период
Сортировка
От CSN
Тема update set x=(subquery on same table)
Дата
Msg-id 20040213081814.67615.qmail@web40612.mail.yahoo.com
обсуждение исходный текст
Ответы Re: update set x=(subquery on same table)
Список pgsql-general
I'm trying to do:

update nodes n1 set n1.parent_id=(select n2.id from
nodes n2 where n2.key=n1.parent_id);

To set parent_id to the id of the parent (rather than
the key). Would UPDATE FROM fromlist work? I couldn't
find any examples of it's use.

TIA,
CSN



__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

В списке pgsql-general по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Temporary views
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: update set x=(subquery on same table)