Carepolice
Power Member
- Mar 25, 2009
- 575
- 571
I know we have some very talented people when it comes to SQL in this community. Hopefully someone is able to lend a hand.
I need to move data from one column to another column with restrictions, and each row of data is likely to be different so it's important that they match the row they originated in.
To better explain:
Example of table (not actual data)
Name Number AmountOwed SourceTable NewColumn
Test 555555 12 052109_ABCD
Test 555555 16 052109_ABCD
Test 555555 13 052109_ABCD
Test 555555 17 052109_ABCD
Test 555555 13 052109_ABCD
Test 555555 11 052109_ABCD
Test 555555 12 052109_ABCD
Test 555555 16 052009_ABCD
Test 555555 13 052009_ABCD
Test 555555 17 052009_ABCD
Test 555555 13 052009_ABCD
Test 555555 11 052009_ABCD
I need to take the data in AmountOwed (for example) and copy it into NewColumn, then delete it from AmountOwed. The result should look like:
Name Number AmountOwed SourceTable NewColumn
Test 555555 052109_ABCD 12
Test 555555 052109_ABCD 16
Test 555555 052109_ABCD 13
Test 555555 052109_ABCD 17
Test 555555 052109_ABCD etc..
Test 555555 052109_ABCD
Test 555555 052109_ABCD
Test 555555 052009_ABCD
Test 555555 052009_ABCD
Test 555555 052009_ABCD
Test 555555 052009_ABCD
Test 555555 052009_ABCD
Keep in mind there are hundreds of thousands of rows inside this table and I need to modify only a select few (maybe 6 thousand)
Any assistance would be greatly appreciated.
I need to move data from one column to another column with restrictions, and each row of data is likely to be different so it's important that they match the row they originated in.
To better explain:
Example of table (not actual data)
Name Number AmountOwed SourceTable NewColumn
Test 555555 12 052109_ABCD
Test 555555 16 052109_ABCD
Test 555555 13 052109_ABCD
Test 555555 17 052109_ABCD
Test 555555 13 052109_ABCD
Test 555555 11 052109_ABCD
Test 555555 12 052109_ABCD
Test 555555 16 052009_ABCD
Test 555555 13 052009_ABCD
Test 555555 17 052009_ABCD
Test 555555 13 052009_ABCD
Test 555555 11 052009_ABCD
I need to take the data in AmountOwed (for example) and copy it into NewColumn, then delete it from AmountOwed. The result should look like:
Name Number AmountOwed SourceTable NewColumn
Test 555555 052109_ABCD 12
Test 555555 052109_ABCD 16
Test 555555 052109_ABCD 13
Test 555555 052109_ABCD 17
Test 555555 052109_ABCD etc..
Test 555555 052109_ABCD
Test 555555 052109_ABCD
Test 555555 052009_ABCD
Test 555555 052009_ABCD
Test 555555 052009_ABCD
Test 555555 052009_ABCD
Test 555555 052009_ABCD
Keep in mind there are hundreds of thousands of rows inside this table and I need to modify only a select few (maybe 6 thousand)
Any assistance would be greatly appreciated.