日期:2014-05-17  浏览次数:20619 次

我这个触发器这样写对不对啊???
create trigger meetingremarks
on meeting
after insert
as
begin
update workflow_form set remark=workflow_form.marks from workflow_form a,inserted b where a.requestid=b.requestid
end
----------------------------------------------
我想创建一个触发器,在表Meeting插入新行的时候生效,做如下步骤:
表Meeting插入新行后,给所插入的新行里面的remark字段赋值表workflow_form中marks字段的值(这两个表的主键都是requestid字段,并且相关联)
话说我这样写对不对啊?


公司OA系统创建一个流程的时候,Meeting表新增一行总没有给remark字段赋值,所以想用触发器来赋值,求指教谢谢

------解决方案--------------------
create trigger meetingremarks
on meeting
after insert
as
begin
update workflow_form set remark=a.marks from workflow_form a,inserted b where a.requestid=b.requestid
end
------解决方案--------------------
探讨
create trigger meetingremarks
on meeting
after insert
as
begin
update workflow_form set remark=b.begindate from workflow_form a,inserted b where a.requestid=b.requestid
end


表Meeting插入新行后,给表……