SQL update based on another table - Please Help
704131Jul 10 2010 — edited Jul 12 2010Two 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