Functions performed on intervals
От | Jimmie Fulton |
---|---|
Тема | Functions performed on intervals |
Дата | |
Msg-id | FB93404FB67ED311ABF9009027991188417EBF@www.ehso.emory.edu обсуждение исходный текст |
Ответы |
Re: Functions performed on intervals
|
Список | pgsql-sql |
I hope this is not the wrong list for this type of question... I'm about to start development on a small app to track employee leave and vacation time. Based on a simple formula, each employee gets x number of days at the end of each month. x is a function of time-in-service and employee type: part-time, full-time, and salary. I could just write a view to display total time accumulated from their start date to current date (minus leave taken), but what happens when the employee moves from part-time to full-time? Their entire leave is recalculated with the new formula and the employee gets some extra time off. The solution I've thought of is to call a function once a month with cron to update each employee's leave balance. Is this the proper way to accomplish this task or are there better methods or approaches to getting the desired effect? Thanks for any advice you can give, Jimmie Fulton Systems Administrator Emory University School Of Medicine
В списке pgsql-sql по дате отправления: