Created
December 29, 2014 13:20
-
-
Save chris-brown/560464dd6ae980c8d41a to your computer and use it in GitHub Desktop.
Comma deliminate a collection a data to a singe column
This file contains 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
GO | |
DECLARE @tableName VARCHAR(MAX) | |
SELECT @tableName = COALESCE(@tableName + ',' ,'') + Name | |
FROM sys.tables | |
SELECT @tableName | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment