>I think you might want to go back and re-read the rules concerning the dates.
I will, it's a bit too complex for me right now, I was thinking about using a table valued function and CROSS APPLY, but could not work it out either.
Need to think more.
If it's not broken, fix it until it is.
My Blog