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
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
Share via: