S
Starry
Hi
I have to use the results of a query as the basis for a number of
calculations to produce a summary table. I can do this by feeding the data
into variables from an array based on the recordset (or directly) and then
use append to place the results into the output table. I was wondering if I
should perhaps make a function that is called from within a query instead
but having never done this I'm not sure.
Purpose:
Calculate weekly wage information from Jobdata
Process as follows:
Grouped select query returns all records for specific week
ordered by employee
with sum of hours for that employee on a given day
Structure:
job - date - employee - sumofhours - week - (a whole bunch of other fields
not important)
For each employee the code checks the rates, checks for sick or holidays,
figures out the total week hours and performs a bunch of calculations based
on pay rules to return the summarized output of their hours rates and costs
Simply:
Employee - hours - rates of diff types - calc results - gross pay
I prefer the first method but am trying to avoid tunnel vision. Thanks.
I have to use the results of a query as the basis for a number of
calculations to produce a summary table. I can do this by feeding the data
into variables from an array based on the recordset (or directly) and then
use append to place the results into the output table. I was wondering if I
should perhaps make a function that is called from within a query instead
but having never done this I'm not sure.
Purpose:
Calculate weekly wage information from Jobdata
Process as follows:
Grouped select query returns all records for specific week
ordered by employee
with sum of hours for that employee on a given day
Structure:
job - date - employee - sumofhours - week - (a whole bunch of other fields
not important)
For each employee the code checks the rates, checks for sick or holidays,
figures out the total week hours and performs a bunch of calculations based
on pay rules to return the summarized output of their hours rates and costs
Simply:
Employee - hours - rates of diff types - calc results - gross pay
I prefer the first method but am trying to avoid tunnel vision. Thanks.