我知道我正在做一些愚蠢的事情,所以道歉 - 为什么我会为以下SQL语句获得'无效的对象名称PositionsDescription'错误?
with cte as (
select
T.C.value('.', 'nvarchar(max)') as Description
from @TheRole.nodes('/descriptions/description') as T(C)
)
insert into PositionDescriptions (Description)
select c.Description
from cte as c
where not exists (select * from PositionDescriptions as p where p.Description = c.Description)
答案 0 :(得分:0)
您在PositioinsDescription
和PositionDescriptions
之间感到困惑,相似但不同。