摘要: SELECT * FROM ( SELECT DISTINCT ZoneEPacket FROM Logistics_Country ) A OUTER APPLY ( SELECT STUFF(( SELECT ';' + ENName ... 阅读全文
posted @ 2018-03-07 16:15 烽火情怀 阅读(172) 评论(0) 推荐(0) 编辑
摘要: CREATE FUNCTION [dbo].[Fun_PadLeft] ( @str NVARCHAR(200) , @pad NVARCHAR(1) , @len INT ) RETURNS NVARCHAR(MAX) AS BEGIN IF ( LEN(@str) > @len ) RETUR... 阅读全文
posted @ 2018-03-07 16:12 烽火情怀 阅读(194) 评论(0) 推荐(0) 编辑
摘要: CREATE FUNCTION [dbo].[SplitToTable] ( @SplitString nvarchar(max),--待分割的字符 @Separator nvarchar(10)=' '--分隔符 ) RETURNS @SplitStringsTable TABLE ( [id] int identity(1,1), [valu... 阅读全文
posted @ 2018-03-07 16:10 烽火情怀 阅读(464) 评论(0) 推荐(0) 编辑