Viewing post 1 (of 1 total)
Thanks 🙂
I tried another approach with CTE and that works fine too.
WITH cte(a)
AS
(
SELECT 1
UNION ALL
SELECT a+1 FROM cte WHERE a<10000
)
SELECT * FROM cte OPTION(MAXRECURSION 10000)
April 25, 2016 at 3:28 am
#1874178