更新表但显示另一个表中的错误

时间:2014-12-08 04:13:53

标签: sql-server

我目前在公司维护旧系统。我想更新一个表,但它在另一个表中给出了错误。这是我的疑问:

USE [Corporate]
GO

ALTER TABLE transfer_detail NOCHECK CONSTRAINT ALL
GO

UPDATE [dbo].[Transfer_Detail]
   SET [Satuan] = 'DUS'
 WHERE  [Satuan] = 'CRT'
GO

ALTER TABLE transfer_detail CHECK CONSTRAINT ALL
GO

但错误说:

Msg 515, Level 16, State 2, Line 22
Cannot insert the value NULL into column 'Transfer_Out', table 'Corporate.dbo.Saldo_Gudang'; column does not allow nulls. UPDATE fails.
The statement has been terminated.

我试图找出这个问题但没有成功。我错过了什么?

1 个答案:

答案 0 :(得分:0)

检查表'[dbo].[Transfer_Detail]'上是否存在任何触发器?