Created
October 25, 2016 12:52
-
-
Save aliprogrammer69/3e10a63ae565c7f826ce4b35c326bb44 to your computer and use it in GitHub Desktop.
How to concat one cloumn of N Rows To One Column in sql server
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
| SELECT STUFF((SELECT ',' + Username | |
| FROM UserMgmt.[User] | |
| FOR XML PATH('p'), TYPE).value('.', 'NVARCHAR(MAX)'),1,1,'') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment