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 |
|
ismailc
Constraint Violating Yak Guru
290 Posts |
Posted - 2008-12-22 : 05:21:49
|
| Hi, I need to update the Split Factor table, previously it was calculated in Excel and then imported. The developer that did this previously has left the company. The Split Factor determines the weight of the day within the month of working days excluding weekends and public holidays on which the sales value is calculated. At the end of the Month the Split Factor value is = 1The SQL table contains 3 cols: Split_Date, Split_Day, Split_Day_AccumI saw the excel sheet (hardcopy) where there are a few calculations: Split_Date - '01/01/2008' - all the days of the yearCol2 - '2008.01' - the period it belongs toCol3 - 'Wrk or Hol' - determine if working day or holidayCol4 - '22' - excl wrk & Hol & calculate the amount of wrk days in monthCol5 - '12' - working day of monthSplit_Day - '0.35' - calculate the value of a day within a month (1)Split_Day_Accum = '0.8' - calculate if not start of month then "Split_Day (0.35)" + Previous Day "Split_Day (0.45)" value, else when first day then only Split_Day Value. Please Assist. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|