Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: RE: [GENERAL] Need to update all entries of one table based on an earlier backup

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux