I am going to be slightly rude here and say you don't do this. Generally accepted database standards state that you do not store any values that can be calculated. This is because if you change any of the base values you have to recalculate the value and store it in the database again. Simply create a query with an expression like this: <b>C:[a]-[b]</b> and you will be fine. In SQL it looks like this:
<b>select a-b as C from table;</b>
If you must store it, it should only be in a table that the data doesn't change, such as for a data warehouse or you are storing it for historical purposes. The update statement would simply be:
<b>update table set c = a -b;</b>
Last Wiki Answer Submitted: October 20, 2008 3:27 pm by Dwaltr900 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.