is a specific query the right solution? (1 Viewer)

3699wat

Registered User.
Local time
Today, 06:30
Joined
Oct 28, 2002
Messages
83
I would appreciate suggestions in handling the following.
My db allows the user to enter charges for specific services. The charges for these services change periodically (usually annually). So I have to be able to change the charges when appropriate (e.g. January 1), but the charges for the previous period should remain. The ultimate goal is to be able to update without having to go into the database window and create new tables and / or queries.
Is this making sense to anyone ?
 

FoFa

Registered User.
Local time
Today, 05:30
Joined
Jan 29, 2003
Messages
3,672
There are many different solutions to this. I think dates are the best approach, that way something that happened on this date is tied to that date in the charges table because that was active at that time.
USA Date Formats in use M/D/Y:
Start-----End-------Service
1/1/2002-1/4/2002--bribe
1/5/2002-NULL------bribe
Means the 1/5/2002 is the current active charge amount for the bribe service.
If you use a start date and end date on your charges, than you become point in time with the data. Say your current charge has a null end date, so you know which it is.
But if that is to much trouble, you could add a start date only and always use the one with the latest date. If you don't like that you can add a flag to the table and set it for the current record, or set it for the old records. I would also make sure you have a unique field for a key along with that, like an autonumber or something.
 

Users who are viewing this thread

Top Bottom