Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: The Dynamic Tally or Numbers Table

    Clearly you did not understand the code. COUNT returns one row. My code returns the vector 0..N-1 based on the size of the target table.

    the sqlist (9/22/2009)


    laughingskeptic (9/22/2009)


    One...

  • RE: The Dynamic Tally or Numbers Table

    Jeff Moden (9/22/2009)

    That's nice, but let's see you use that in a join or even as a stand-alone result set.

    A table valued function will cover this if you don't want...

  • RE: The Dynamic Tally or Numbers Table

    One usualy does not need a tally table larger than the largest table. In which case the following works as a generator:

    declare @i bigint

    set @i = 0

    select @i=@i+1 as...

Viewing 3 posts - 1 through 3 (of 3 total)