Re: [SQL] UPDATE COMPATIBILITY

2012-01-17 Thread Samuel Gendler
On Tue, Jan 17, 2012 at 12:49 AM, Thomas Kellerer wrote: > Gera Mel Handumon, 17.01.2012 07:31: > > What version of postgresql that the update compatibility below will be >> implemented? >> >> UPDATE COMPATIBILITY >> >> >> UPDATE accounts SET (contact_last_name, contact_first_name) = >> (SELE

Re: [SQL] UPDATE COMPATIBILITY

2012-01-17 Thread Thomas Kellerer
Adrian Klaver, 17.01.2012 16:19: You need to rewrite it to: UPDATE accounts SET contact_last_name = s.last_name, contact_first_name = s.first_name FROM salesmen s WHERE s.id = accounts.sales_id For completeness, you could also do: UPDATE accounts SET (contact_last_name,cont

Re: [SQL] UPDATE COMPATIBILITY

2012-01-17 Thread Adrian Klaver
On Tuesday, January 17, 2012 12:49:44 am Thomas Kellerer wrote: > Gera Mel Handumon, 17.01.2012 07:31: > > None as far as I know. > > You need to rewrite it to: > > UPDATE accounts >SET contact_last_name = s.last_name, >contact_first_name = s.first_name > FROM salesmen s > WHERE s.i

Re: [SQL] UPDATE COMPATIBILITY

2012-01-17 Thread Thomas Kellerer
Gera Mel Handumon, 17.01.2012 07:31: What version of postgresql that the update compatibility below will be implemented? UPDATE COMPATIBILITY UPDATE accounts SET (contact_last_name, contact_first_name) = (SELECT last_name, first_name FROM salesmen WHERE salesmen.id = accounts.sales_

[SQL] UPDATE COMPATIBILITY

2012-01-16 Thread Gera Mel Handumon
What version of postgresql that the update compatibility below will be implemented? UPDATE COMPATIBILITY UPDATE accounts SET (contact_last_name, contact_first_name) = (SELECT last_name, first_name FROM salesmen WHERE salesmen.id = accounts.sales_id); TIA, -- Gera Mel E. Handumon --