Wednesday, 14 May 2014

Select all rows and particular data with Commas in Sql server

DECLARE @name NVARCHAR(MAX)
SELECT @name= COALESCE(@name + ',', '') + [Column Name] FROM [Table Name]
SELECT [Column Name] = @name

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...