Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Counting

    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)

Viewing post 1 (of 1 total)