5 pts.
 field C is the result of the substraction between filed A and field B from the same table
How to create a field C into a MS Access table which will be the result of the subtraction between filed B and filed A on the same table. Like: C=B-A

Software/Hardware used:
ASKED: October 19, 2008  9:41 PM
UPDATED: October 20, 2008  3:27 PM

Answer Wiki:
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  Dwaltr   900 pts.
All Answer Wiki Contributors:  Dwaltr   900 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _