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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Update with 2 different WHERE condition

AceNoviceJul 28 2010 — edited Jul 28 2010
I have 2 tables, Table1 contains only ID and table2 has id and indicator. Now i want to update the INDI field in Table2.
TABLE1
======
ID
-----
A123
A456
A678
A890


TABLE2
======
ID	INDI
-----	----
A123	
A456
A678
A890
A666
A898
If ID of TABLE2 matches with ID of TABLE1 then update INDI with 'MMM' else update INDI with 'OOO'. How can i achive this?

FInal result will be....
TABLE2
======
ID	INDI
-----	----
A123	MMM
A456	MMM
A678	MMM
A890	MMM
A666	OOO
A898	OOO
This post has been answered by 737905 on Jul 28 2010
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 25 2010
Added on Jul 28 2010
8 comments
15,882 views