Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Update Query getting hanged

888369Oct 6 2011 — edited Oct 6 2011
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2011
Added on Oct 6 2011
3 comments
159 views