Create Or Replace Trigger update_TOS_D_PATIENT_PAST
 AFTER update On TOS_D_PATIENT_PAST For Each Row
Begin
     调用存储过程(把:new.id)传到存储过程里面
End;这个存储过程的功能:
结果1 = SELECT TOS_SP_PATIENTINFOMNGDATA.FILL_KNJKIORRK('传入的参数:new.id') FROM DUAL;
update table set 字段=结果1 where id= 传入的参数:new.id
 
请问这个存储过程怎么写啊?

解决方案 »

  1.   

    我这样建存储过程:(正确)
    create or replace procedure test_pro
    (
     id in number
    )
    is
    begin
    update tos_d_patient_info_summary t set t.knj_kiorrk = TOS_SP_PATIENTINFOMNGDATA.FILL_KNJKIORRK(id) where t.patient_id = id;
    end;之后我这样建立触发器:
     Create Or Replace Trigger update_TOS_D_PATIENT_PAST
     AFTER update On TOS_D_PATIENT_PAST For Each Row
    Begin
         call test_pro(:new.patient_id);
    End;
    之后我更新表TOS_D_PATIENT_PAST的时候,报错,说触发器错误!!!!请问怎么错了啊