Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

tsql For XML Path('), TYPE).value

SELECT
         STUFF((select ',' + quotename (C.name)
          from sys.columns c
          where c.object_id = OBJECT_ID('dbo.result2')
          for xml path(''), TYPE).value('(./text())[1]', 'NVARCHAR(MAX)'),1,1,'');
Source by dba.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #tsql #For #XML
ADD COMMENT
Topic
Name
8+8 =