[GENERAL] is it possible to do an update with a nested select that references the outer update ?

2009-10-06 Thread Jonathan Vanasco
A typo in a webapp left ~150 records damaged overnight I was hoping to automate this, but may just use regex to make update statements for this basically , i have this situation: table a ( main record ) id , id_field , fullname table b ( extended profiles ) id_field ,

Re: [GENERAL] is it possible to do an update with a nested select that references the outer update ?

2009-10-06 Thread Alban Hertroys
On 6 Oct 2009, at 18:57, Jonathan Vanasco wrote: i think this attempt most clearly expresses what I was trying to do UPDATE table_a a set id_field = ( SELECT id_field FROM table_b b WHERE a.first_name || ' ' || b.last_name = a.fullname ) WHERE id_field IS NULL ; I'd be greatful if