Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

looking for running and resetable totals in a DB

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I am looking for an idea on how to keep a running total of sales but flag me when a customer spends a certain amount. Once that amount is reached, the flag will send a letter to Word. (this bit I have)

Once the threshold is met, the new total is the total spent less the threshold but, I want to be able to keep the running total as well.
eg. total price = X
if X > 100 then
Y = sendletter
X = X - 100
newtotal = Z
endif
update db

etc..
so far I have a (each) sales table and a new table with all the totals to keep tabs on the X value above.

Any help would be most appreciated.

Regards,
cal56
 
If I understood u correctly, storing the running total into a separate history table might help so that u can refer to that table later when required.
 
If I understood u correctly, storing the running total into a separate history table with month/year and other details might help so that u can refer to that table for sales with specific time period when necessay.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top