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,contact_first_name)=
> (s.last_name,s.first_name)
> FROM salesmen s
> WHERE s.id = accounts.sales_id
>
Nice one!