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.

SQL update based on another table - Please Help

704131Jul 10 2010 — edited Jul 12 2010
Two tables. Both have the same columns. For the two columns, VALUE column is unique, number is not and represents a
group as can be seen from the example.


T1

NUMBER VALUE
123 V1
123 V2
123 V3
321 V4
321 V5
421 V6
421 V7
421 V8
421 V9


T2

NUMBER VALUE
123 V1
123 V2
123 V3
321 V4
321 V5
421 V6
421 V7
421 V8



T2 is the my check table and holds the correct number and value pairings. So for T1 i want to update values which are no longer in a particular number
group bylooking at T2. So in the example above i would update row 421, V9 in T1 changing the value 421 to null since V9 is not in check table against group 421.


Can someone confirm the easiest way to do this is for all such values, i don't wanna mess around with cursors etc.

Thanks

Edited by: user10568331 on 10-Jul-2010 05:32

Comments

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

Post Details

Locked on Aug 9 2010
Added on Jul 10 2010
6 comments
1,897 views