Created
January 28, 2016 10:47
-
-
Save Codesleuth/3be7eafcae48e42352cc to your computer and use it in GitHub Desktop.
SQL Server Create Incrementing List
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @s VARCHAR(8000) | |
SELECT @s = COALESCE(@s + ',', '') + '@Thing' + CONVERT(nvarchar,[number]) | |
FROM [master].[dbo].[spt_values] | |
WHERE [name] is null and [number] between 0 and 197 | |
SELECT @s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment