Viewing 2 posts - 1 through 2 (of 2 total)
we can do this with COALESCE function also
DECLARE @dbs TABLE ( DBname NVARCHAR(100) )
DECLARE @txt varchar(50)
INSERT INTO @dbs
VALUES ( 'A' ),
( 'B' ),
( 'C' )
select @txt=COALESCE(@txt+',','')+DBname...
June 24, 2016 at 2:06 am
#1886664
...
June 24, 2016 at 2:01 am
#1886663