0
我需要拆分通過|
分隔參數值,然後我需要這些值的每插入表分割參數和插入值通過循環T-SQL
SELECT [value]
FROM STRING_SPLIT(@AtmRef, '|');
WHILE(@IND != LEN(@STR))
BEGIN
INSERT INTO Monitoring (UserId, Name, Surname, Branch, AtmRef, CheckTime, Telephone, Email, DateCreated)
VALUES (@UserId, @Name, @Surname, @Branch, @AtmRef, @CheckTime, @Telephone, @Email, GETDATE())
END
凡@userId
,@name
等是從值@AtmRef
。現在STRING_SPLIT
給我所有的值在一列
我該怎麼做?