我收到了错误:
“无法绑定多部分标识符”split.item“。
我差不多要为每个人制作第三张桌子,这只是一个例子:
SELECT
split.item as memberID
FROM
tics T
JOIN
mem M
ON
m.memberId = split.item
CROSS APPLY
dbo.Splitstring(t.Resources,',') AS split
答案 0 :(得分:3)
您的联接顺序错误,您无法引用SQL后面的内容,在这种情况下" m.memberId = split.item"因为拆分是您在那里添加的下一个项目。正确的方法是:
SELECT
split.item as memberID
FROM
tics T
CROSS APPLY dbo.Splitstring(t.Resources,',') AS split
JOIN mem M ON m.memberId = split.item