INSERT INTO sql server错误 - 无效的对象名称

时间:2013-10-17 08:03:40

标签: sql sql-server

我知道我正在做一些愚蠢的事情,所以道歉 - 为什么我会为以下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)

1 个答案:

答案 0 :(得分:0)

您在PositioinsDescriptionPositionDescriptions之间感到困惑,相似但不同。