Question: Enter and execute the following script to move a quantity of 1000 of ProductID from Location 1 to Location 6. Notice that we only have
Enter and execute the following script to move a quantity of 1000 of ProductID from Location 1 to Location 6. Notice that we only have a quantity of 408 in Location 1, so taking away 1000 would result in an unwanted negative value. We can check for the negative value condition and roll back to an interim save point named Negative Qty Check,
Your result should look similar to Figure 9-8. Notice that the first UPDATE is reflected (showing the quantity in location increased by 1000), but the second UPDATE has been rolled back (leaving the quantity as 408). This is a little misleading though. The first UPDATE actually isnt committed to the database yet, but is viewable in this connection.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
