I have two columns in a table - SHIPLOGREGION and COPIES. Data is:0444/13176/35602/1

I want to write a query that says:

Check SHIPLOG table. If REGION is 0444, then change COPIES of 0444 from 1 to 0 and add COPIES count to 3176.Create a temp table with:Insert 3176 into temp table with the new count of 4 and 0444 into temp table with new count of 0.

I was with you up to the "....then change COPIES of 0444 from 1 to 0". But I didn't follow what you are saying starting with "and add COPIES count to 3176." Can you explain what that means? What will the table look like after the changes are done?

Like this: REGION 3176 has 3 COPIES, REGION 0444 has 1 COPIES. I need the query to look at the table and create a temp table. In the temp table, the query says: IF there is REGION 0444, subtract the number of COPIES AND add it to REGION 3176. In the temp table, you should see:REGION 3176 now has 4 COPIES, REGION 0444 now has 0 COPIES.