• When I executed this statement

    SELECT * FROM [MyDB].[dbo].[fn_GetTimestampRange] (DateAdd(YY,-10,GETDATE()), GETDATE(), 1)

    it returned 8726399 records in 2.29 mins and then gave error as

    "The statement terminated. The maximum recursion 100 has been exhausted before statement completion."

    Any idea why this error cropped up?