April 16, 2016

Linear Count

/* Increment and dynamically generate a list of integers for use with the Predicate */

PRINT '(' + '''' + convert(varchar(10),@StartNumeral) + ',' + ''''

WHILE @StartNumeral < @EndNumeral

BEGIN
SELECT @StartNumeral = @StartNumeral + 1
PRINT '''' + cast(@StartNumeral AS varchar(6)) + '''' + ',' 
END

PRINT '''' + convert(varchar(10),@StartNumeral + '''' + ')'