Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Hi Chris or anyone who can help When I try this just below, it complains about foo (new table created in db2) , saying *ERROR: schema foo does not exist*. I got stuck on this error for a while now but still trying to see why but still no luck so far. If you have something please help

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Alban Hertroys
On 28 March 2014 11:07, Khangelani Gama kg...@argility.com wrote: Hi Chris or anyone who can help When I try this just below, it complains about foo (new table created in db2) , saying ERROR: schema foo does not exist. I got stuck on this error for a while now but still trying to see why but

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Chris Curvey
On Fri, Mar 28, 2014 at 5:56 AM, Khangelani Gama kg...@argility.com wrote: Hi Chris or anyone who can help When I try this just below, it complains about foo , saying ERROR: schema foo does not exist. I got stuck on this error for a while now but still trying to see why but still no luck

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Hi Chris I did replace foo and bar tables with my tables, in db2 I have table foo(the one to be updated) and the table bar(the one which has data I got from db1) *From:* ccur...@gmail.com [mailto:ccur...@gmail.com] *On Behalf Of *Chris Curvey *Sent:* Friday, March 28, 2014 1:50 PM *To:*

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Rémi Cura
Not sure, but maybe update foo set br_desc = bar.br_desc , br_active = bar.br_active (rest of columns) where br_cde = bar.br_cde; Anyway it seem sto be terribly bad idea to give those kind of names ! Cheers, Rémi-C

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Chris Curvey
I think the convention on this list is to bottom-post. On Fri, Mar 28, 2014 at 7:59 AM, Khangelani Gama kg...@argility.com wrote: Hi Chris I did replace foo and bar tables with my tables, in db2 I have table foo(the one to be updated) and the table bar(the one which has data I got from

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Thank you very much, I on my previous try I did not include the FROM. I will just do thoroughly checks before COMMIT. Thanks very much. *From:* ccur...@gmail.com [mailto:ccur...@gmail.com] *On Behalf Of *Chris Curvey *Sent:* Friday, March 28, 2014 2:38 PM *To:* Khangelani Gama *Cc:* pgsql

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Hi Chris or anyone who can help When I try this just below, it complains about foo , saying ERROR: schema foo does not exist. I got stuck on this error for a while now but still trying to see why but still no luck so far. If you have something please help begin; update foo set br_desc

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Khangelani Gama
Hi Chris or anyone who can help When I try this just below, it complains about foo , saying ERROR: schema foo does not exist. I got stuck on this error for a while now but still trying to see why but still no luck so far. If you have something please help begin; update foo set br_desc

Re: [GENERAL] Synchronizing a table that is in two different databases : Need to dump a table as inserts from db1 and change the insert statements into UPDATE statements

2014-03-28 Thread Markella Skempri
have you tried update foo set br_desc = bar.br_desc , br_active = bar.br_active (rest of columns) from bar where foo.br_cde = bar.br_cde; From: Khangelani Gama Sent: Friday, March 28, 2014 9:59 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Synchronizing a table that is in