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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2000-11-20 : 08:48:18
|
Scott writes "MS SQL 7.0 sp2, Win NT4 sp6
Each project has an ID, Start & end date and a budjet. I need to create a trigger that will take the budget and split it up over its duration and assign a percentage of the budget to each month depending on the no. of days in that month according to the start & end date.
eg: start = 15 Jan, end = 12 March, Budget = $20 000 Total no. days = 58; Budget per day = $344.83 Jan = 17 days, Feb = 29 days, March = 12 days therefore assign Jan = $5862.07 Feb = $10 000 March = $4137.93
Either this must be written into a new table or I can use the statement in an asp. All I want at the end is for any month & year according to project how much money is allocated to that project.
I think this is pretty complex! Any help would be appreciated Thanks" |
|
|
|
|
|