>>
http://social.technet.microsoft.com/wiki/contents/articles/25654.t-sql-find-the-peak-hour.aspx>
>Snip : "a simple solution"
>
>If you call that simple what do you call 'complicated' :-}
>
>I raised this with Kevin : given the option of a simple CLR method (a small piece of code with more flexible options over the number of periods in the table and the span of the 'peak' period why on earth would you use this T-SQL ?
Did you compare CLR solution with T-SQL in terms of speed?
Yes, for me that solution is simple, but the CLR solution would be more complex. I personally would only employ CLR solution when there is no simple T-SQL solution (or performant).
If it's not broken, fix it until it is.
My Blog