Sql query
DECLARE @Cols nvarchar(max);
SET @Cols = STUFF((SELECT ', ' + QUOTENAME(para_name) FROM t_WQ_Cont_list ORDER BY rpt_seq FOR XML PATH(''), TYPE).value('.', 'nvarchar(MAX)'),1,1,'')
SELECT @Cols;
///////// Result
[Cl], [EC], [TDS], [Fe], [pH], [SO4]
No comments:
Post a Comment