不能绑定多部分标识符

时间:2022-08-16 09:18:27
select (case when t.freeplayabandoned != f.freeplayabandoned then 'freeplayabandoned'
             when t.freeplaydownloaded != f.freeplaydownloaded then 'freeplaydownloaded'
    end) 
from testtable t where not exists (select * from freeplay.egmfreeplay f  where f.freeplaydownloaded  = t.freeplaydownloaded)

I was trying to get the column names of the record of testtable which dont match with the that of freeplay.egmfreeplay

我试图获取与freeplay记录不匹配的testtable记录的列名

and i m getting the error the following error

我得到了下面的误差

Msg 4104, Level 16, State 1, Line 1 The multi-part identifier "f.freeplayabandoned" could not be bound. Msg 4104, Level 16, State 1, Line 1 The multi-part identifier "f.freeplaydownloaded" could not be bound.

Msg 4104,第16级,状态1,第1行,多部分标识符“f.freeplay遗弃”不能被绑定。Msg 4104,第16层,状态1,第1行多部分标识符“f.freeplaydownload”无法绑定。

can somebody help??

有人可以帮忙吗? ?

1 个解决方案

#1


6  

f is scoped inside the subquery inside the call to exists. You can't use it outside the subquery.

f的作用域在要存在的调用的子查询中。您不能在子查询之外使用它。

#1


6  

f is scoped inside the subquery inside the call to exists. You can't use it outside the subquery.

f的作用域在要存在的调用的子查询中。您不能在子查询之外使用它。