标题:运行触发器怎么出错呀?
取消只看楼主
零点冻结
Rank: 1
等 级:新手上路
帖 子:67
专家分:0
注 册:2005-12-2
 问题点数:0 回复次数:1 
运行触发器怎么出错呀?

ALTER TRIGGER [DelAlarm]
ON [dbo].[vcom_alarm_set] for DELETE
AS
declare @tempid int
BEGIN
select @tempid = vasid from deleted
delete from vcom_alarmdev_ship where vasalarmid = @tempid
delete from vcom_alarm_action where vaaalarmid = @tempid
delete from vcom_alarmpurview where vpalarmid = @tempid
delete from vcom_alarm_plan where vapalarmid = @tempid
END

语法可以通过,但运行时就出错,如下:
消息 208,级别 16,状态 6,过程 temp1,第 10 行
对象名 'temp1' 无效。


请教高人指点。谢谢各位!!!

搜索更多相关主题的帖子: 触发器 tempid delete vcom alarm 
2007-08-15 09:03
零点冻结
Rank: 1
等 级:新手上路
帖 子:67
专家分:0
注 册:2005-12-2
得分:0 
我粘贴的时候把temp1名称改为DelAlarm了,你可以视为名称相同。

2007-08-15 09:55



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-162782-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.574498 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved