Update Query getting hanged
888369Oct 6 2011 — edited Oct 6 2011Hi All,
I basically want to fire an update query on Table A which involves getting data from other table say B and A again.
Does this query make sense, this is getting hanged with no erros.
Is their a better way to achieve it.
If lr_id is 2 then UF table's affiliate Id returns me say value in context X
If lr_id is 20005 then UF table's affiliate Id returns me say value in context Y.
I want to update UF table where context is Y that is lr_id is 20005.
and values i have to get from the join of UF table with context X that is lr_id =2 and STG table which stores Context X.
UPDATE UF set UF.affiliate_id =
(Select someColumn from STG cdu,
UF iua where iua.lr_id = 2
and cdu.X= iua.affiliate_id
and UF.user_id = iua.user_id)
Where UF.lr_id = 20005;
Please help.
Thanks,
Manish R