我在删除/更新表格中的特定行时遇到了麻烦。 桌子小而简单:
CREATE TABLE dummy
(
"numemv" NVARCHAR(50) NOT NULL DEFAULT NULL,
"control_summ" DECIMAL NOT NULL DEFAULT NULL,
"active" CHAR(1) NOT NULL DEFAULT '1',
"departid" INT NOT NULL DEFAULT NULL,
UNIQUE INDEX "UNIQUE" ("numemv")
)
我无法删除/更新的行:
numemv control_summ active departid
00499038 400000 1 0
我试图以这种方式管理:
UPDATE dbo.atm_control_summs
SET departid = 13
WHERE departid = 0
DELETE FROM dbo.atm_control_summs
WHERE departid = 0
UPDATE dbo.atm_control_summs
SET departid = 13
WHERE numemv = '00499038'
DELETE FROM dbo.atm_control_summs
WHERE numemv = '00499038'
但我总是得到错误:
错误SQL(8114):将数据类型varbinary转换为数字时出错。
如何解决此错误?
提前致谢:)