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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Calculate Split Factor

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 = 1

The SQL table contains 3 cols: Split_Date, Split_Day, Split_Day_Accum

I saw the excel sheet (hardcopy) where there are a few calculations:

Split_Date - '01/01/2008' - all the days of the year
Col2 - '2008.01' - the period it belongs to
Col3 - 'Wrk or Hol' - determine if working day or holiday
Col4 - '22' - excl wrk & Hol & calculate the amount of wrk days in month
Col5 - '12' - working day of month
Split_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

Posted - 2008-12-22 : 05:39:08
See http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
and post some more, please.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -