rf********@softhome.net wrote:
I am not familiar with programming languages. I use Access because it
is simple to construct queries. PROBLEM: In a database used to
calculate employee payslips everything went smoothly on both the
current data and the accumulated total until an employee was given a
raise. The raise is now being used to to calculate the year to date
amount recieved even though I thought I had limited it in the query to
after the date of raise. I am sure someone has solved this problem and
would appreciate learning how to do it myself. Thank you in advance
for your consideration.
Common normalization practices dictate "never store data that can be
computed". IMO there are times for exceptions to that rule. Payroll,
for the situation that you have described, is one of those situations.
Pay rates will change, there will often be exceptions, for bonuses,
leave of absence, etc. Another example would be invoicing. Prices
change, discount rates and so on can change.
For payroll, my preference is to store the actual pay data in another
table, separate from the employee table. YTD gross can be easily summed
from that table, and not be affected by changes in pay rates.
HTH
--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.