Re: Need to update all entries of one table based on an earlier backup

Поиск
Список
Период
Сортировка
От Gregory Williamson
Тема Re: Need to update all entries of one table based on an earlier backup
Дата
Msg-id 8B319E5A30FF4A48BE7EEAAF609DB233021F2E71@COMAIL01.digitalglobe.com
обсуждение исходный текст
Ответ на Need to update all entries of one table based on an earlier backup  ("Gregory Williamson" <Gregory.Williamson@digitalglobe.com>)
Список pgsql-general

Thomas Pundt wrote:
>
> On Freitag, 20. Juni 2008, Gregory Williamson wrote:
<...snip...>
> Does
>
> update foo
>    set foo.foo_name2 = foo_old.foo_name2
>   from foo_old
>  where foo.foo_id = foo_old.foo_id;
>
> work for you?

Thanks to all for pointing out the FROM clause.!

"UPDATE foo set foo_name2 = foo_old.foo_name2 FROM foo_old WHERE foo.foo_id = foo_old.foo_id;" did the trick. 

For some reason I keep forgetting that bit. Especially when under stress in the wee hours of the morn. Back to sleep ... ZZZzzzzZZZZ

And thanks again !

GSW

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

Предыдущее
От: "Markus Wollny"
Дата:
Сообщение: Re: Need to update all entries of one table based on an earlier backup
Следующее
От: Thomas Pundt
Дата:
Сообщение: Re: Need to update all entries of one table based on an earlier backup