Skip to Main Content

SQL & PL/SQL

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!

How to update with data on two table

518838May 18 2007 — edited May 18 2007
Hi,
I'm having below problem:
Table 1: T_UTR(bdate,rec,id,channel,invoice,prod,proc_date)
Table2: t_upd_utr(bdate,rec,id,channel,invoice,prod)

I want to update data in t_utr like below:

update t_utr set proc_date=sysdate,invoice=t_upd_utr.invoice
where
t_utr.bdate=t_upd_utr.bdate
And t_utr.rec=t_upd_utr.rec
And t_utr.id=t_upd_utr.id
And t_utr.channel=t_upd_utr.channel
And t_utr.invoice=t_upd_utr.invoice
And t_utr.prod=t_upd_utr.prod

I'm not able to do so with join as join is not possible in update statement.
Pls advice how can I achieve the above update with least complexity

Thanks
Deepak
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2007
Added on May 18 2007
4 comments
366 views