摘要:
1CREATEFUNCTIONfGetStrBySplit2(3@SourceVARCHAR(max),4@IndexINT,5@SplitCharVARCHAR(1)6)7RETURNSvarchar(MAX)8AS9BEGIN1011DECLARE@LenINT12DECLARE@nINT=013DECLARE@ChIndexINT14DECLARE@ResultVARCHAR(MAX)15--获取总长度16SET@Len=LEN(@Source)17--获取切割字符位置18SET@ChIndex=CHARINDEX(@SplitChar,@Source)1920WHILE@ChIndex 阅读全文