Last post May 28, 2012 02:14 AM by anitsolution
May 27, 2012 04:22 AM|moe_caruso|LINK
Hello guys ,
I am wondering how coud I do the following : I am building a system for a printer leasing company.I have a table called "Maintenance" which has the following fields : (,maint_id,maint_date,maint_cost,maint_type,machine_id),it will record the details for
every maintenance done for a specific machine.There is also a field called "machine_reading" that is for storing the current number of papers printed by the machine.So,for example,when replacing a new toner for the printer,the current reading should be inserted
in "Maintenance" table.What I want to do is to calculate the difference between the reading when the new toner has been put,and the reading when the toner has been replaced,so I know how many papers every toner could print.
I hope this was clear enough.Please give me suggestion on how to do this.
Thank you in advance.
May 27, 2012 12:15 PM|vckreddyece|LINK
May 28, 2012 02:14 AM|anitsolution|LINK
If you are using Crystal reports than you can use running totals fields to calculate the same.
If you want to use Sql Server Sql's then you need to create a SP which will run a loop and update a temporary table to get the final result.