Skip to content

Commit

Permalink
修改forxml连接字段
Browse files Browse the repository at this point in the history
chidreal committed May 8, 2024
1 parent 493883d commit 2477c5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 6.字符串逗号分隔返回table.sql
Original file line number Diff line number Diff line change
@@ -10,4 +10,8 @@ ALTER function [dbo].[Dhf_split](@c varchar(2000),@split varchar(2))
end
insert @t(col) values (@c)
return
end
end



将多行某列值合并为逗号分隔的一列  SELECT STUFF((SELECT ','+name FROM 表名 for xml path('')),1,1,'')

0 comments on commit 2477c5a

Please sign in to comment.