Query to concatenate row values in sql server

Query to concatenate row values in sql server

If we want to concatenate one column row values into single row we need to write query like this

DECLARE @subscribedTag VARCHAR(MAX) ,@id int;
SELECT @subscribedTag = COALESCE(@subscribedTag + ‘, ‘, ”) + tagcode FROM TagMaster where id =@id

Single

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply