Viewing 3 posts - 1 through 3 (of 3 total)
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)
October 4, 2009 at 9:54 am
#1061475
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.
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...
October 4, 2009 at 9:48 am
#1061473
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...
September 22, 2009 at 1:12 pm
#1057074