create or replace trigger tgr_insertinworkdone
after update on workassgined
referencing new as new old as old
for each row
declare
workdonetemp number(15);
begin
select max(workdoneid) into workdonetemp from workdone;
if :new.complete_status = 'T'
then
insert into workdone(workdoneid,workid,workdatedate,type,status)
values(workdonetemp+1,old.docid,old.taskdate,'C','Completed');
end if;
end;
获取错误或:此处不允许使用00984列。 在这里我试着在workdone表中插入一行基于完成标志Ture在workassgined表中,一旦这个标志变为'T',那么应该在workdonw表中插入一行。有什么帮助吗?
答案 0 :(得分:0)
猜猜你在旧之前错过了冒号(:) 应该是
插入workdone(workdoneid,workid,workdatedate,type,status) 值(workdonetemp + 1,:old.docid,:old.taskdate, 'C', '完成');