delphi6BDE
Programmer
I have a stupid calculated values question.. I know it's bad to store calculated values, but I have a need to. I have built an application in Delphi using access as the database that updates values in a record from a text file daily.
Each row in the text file updates the database in the corresponding record without issues. However, three values must be the sum of the related area the belong to
My table structure is:
tblArea
-------
areaID
strArea
tblTruck
--------
truckID
strTruck
lngValue
strArea | strTruck | lngvalue
-----------------------------
1 | 1 | 34
1 | 2 | 16
1 | 99 | 50 <-- this should be the total of the previous two records
How do I wrote a query to do this? The 'total value' is needed later for reporting and other functions that cannot be done any other way. Currently I manually change these totals daily and it's getting to be annoying
Each row in the text file updates the database in the corresponding record without issues. However, three values must be the sum of the related area the belong to
My table structure is:
tblArea
-------
areaID
strArea
tblTruck
--------
truckID
strTruck
lngValue
strArea | strTruck | lngvalue
-----------------------------
1 | 1 | 34
1 | 2 | 16
1 | 99 | 50 <-- this should be the total of the previous two records
How do I wrote a query to do this? The 'total value' is needed later for reporting and other functions that cannot be done any other way. Currently I manually change these totals daily and it's getting to be annoying