Home > Archive > MS SQL Data Warehousing > March 2006 > Cumulative sum and ratio with SQL 2005









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Cumulative sum and ratio with SQL 2005
Jéjé

2006-03-11, 8:23 pm

Hi,

I'm looking for a SQL 2005 query to do a running sum to do this:
I want to identify the first day when an employee reached 20% of absences.

I have 2 table:
Absences (by activity, day, employee...)
Activities (duration in days...)

so when an employee in 1 activity reached 20% of time lost I want the day
when this event appears.

I want an SQL 2005 version. does the new features in 2005 can provides good
results quickly?

also I have AS2005 cubes based on these tables.
I have tried MDX formula, but its too slow to be effective, so I'll preload
my cube from a view.
but maybe you have a magic MDX formula ;-)

the destination cube for this cumul will allow the user to know which
activity, who and when an employee reached the threshold value, also the
frequency etc...

thanks for your feedback.

Jerome.


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com