Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Vacations, calendars - wher do I start?

Author  Topic 

nick_dkc
Starting Member

25 Posts

Posted - 2009-10-23 : 04:38:26
Here's the beginning of the problem and any feedback will be very welcome - I am not seeking a programmed solution just yet (although if someone has one of course I am not going to reject it) - just any feedback from people who may have faced a similar requirement OR who can see the issues involved.

I need to record employee holidays.

I also need to record how much vacation an employee has available ( i have base data).

I need to use each 'vacation event' to update how much vacation an employee has left.

I need to identify the TOTAL absence and TOTAL WORKDAYS absence for each 'Vacation Event'

We operate on a Middle East Calendar (work week is Sunday through Thursday) and the Government frequently announces ad hoc public holidays - which our staff are entitled to.

Staff have un-used public holidays AND vacation days from previous years.

Q1. Should I create a calendar table that I use in all situations? If so:
What would be best?
Can anyone recommend a script?
How do I make it so that if public holidays are added I can update the public holidays for all staff?

Q2. Can anyone suggest a table structure for me to start playing with


What I really need (grovelling!) is some help/guidance/advice on HOW to proceed with this.



Nick, Dubai

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-10-23 : 12:35:52
1. you could create a calendar table with a bit field to indicate if its working day or not. by default weekends will have this field value as 0. you need to just join onto to this using date to see if it was a working day or not
2. the columns can be ID, date,weekno,workingday and you may also store financial year details too like FY,period,..
Go to Top of Page
   

- Advertisement -