读书人

多表查询后批改报错

发布时间: 2012-08-07 14:54:49 作者: rapoo

多表查询后修改报错

SQL code
Update aset a.FPlanTrategy='324'from t_ICitem a , dbo.abc$ bwhere   a.Fnumber=b.物料代码









消息 4422,级别 16,状态 1,第 1 行
View 't_ICitem' has an INSTEAD OF UPDATE trigger and cannot be a target of an UPDATE FROM statement.

[解决办法]
根据视图找到相关字段 再做多表查询
SQL codeUpdate C
set c.FPlanTrategy='324'
from t_ICitem a , dbo.abc$ b table c

where a.Fnumber=b.物料代码 and c.Fnumber=b.物料代码

读书人网 >SQL Server

热点推荐