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.
| Author |
Topic |
|
micnie_2020
Posting Yak Master
232 Posts |
Posted - 2011-08-24 : 04:04:01
|
| Dear All,I have 4 table.Employee--------employeecodedatejoinallocateidleaveallocatebyPosId--------------------allocateidday (eg: start with 18 day)incrementday (eg: 1 day)maxday (28)rangeincrement (eg: 2 year increase 1 day )P/s: Joined Date on Apr 2010 - Mar 2011 1 year. If join on 28/Aug/2010 will count as pro-data from Sept 2010 to Mar 2011.leavesummary------------employeecodeyearBFYearToDatedayTakenLeaveHistory------------id [autonumber]codefromdatetodatedayTakenreasonallocateidAnyone can provide me the Stored Procedure to run end of the day of the year to update table leavesummary (eg: Last of every year March). The calculation will based on employee joindate & allocateid link with table leaveallocatebyPosId.Thank you. Appreciate for your kindly help.Regards,Micheale |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-24 : 04:21:56
|
| whats BFYearToDatedayTaken etc fields? where do u get thier values from?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-29 : 07:34:34
|
| where are rest of sample data and explanation of logic. Please understand we dont have access to your system and dunno how data is existing in your tables.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|