OPTION (MAXRECURSION n)
n
10
32767
0
CREATE PROCEDURE dbo.usp_GenerateDates @startdate DATETIME ,@enddate DATETIME AS BEGIN ;WITH DatesCTE(CurrentDate) AS ( SELECT @startdate AS CurrentDate UNION ALL SELECT DATEADD(day,1,CurrentDate) FROM DatesCTE WHERE CurrentDate < @enddate ) SELECT CurrentDate FROM DatesCTE OPTION (MAXRECURSION 0) END
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.