DECLARE @STR VARCHAR(8000) set @STR=char(39)
SELECT @STR = ISNULL(@STR,'')+Flowdirection+char(39)+','+char(39) FROM W_inf_IQCDepartmentSet_Details
SELECT @STR SELECT SUBSTRING(@STR,0,len(@STR)-1)
--拼接字符串 单引号用 char(39) char(37)代替%
本文共 281 字,大约阅读时间需要 1 分钟。
DECLARE @STR VARCHAR(8000) set @STR=char(39)
SELECT @STR = ISNULL(@STR,'')+Flowdirection+char(39)+','+char(39) FROM W_inf_IQCDepartmentSet_Details
SELECT @STR SELECT SUBSTRING(@STR,0,len(@STR)-1)
--拼接字符串 单引号用 char(39) char(37)代替%
转载于:https://www.cnblogs.com/heng0906/p/3284982.html