Oracle学习笔记(动态函数调用)
/// ---动态函数调用 m_sentence:='begin :1:='||m_exec_func||'('||i_bill_id||'); end;';
if Result=0 then
Select exec_func Into m_exec_func From wf_stepdeal Where deal_id=i_deal_id;
If m_exec_func Is Not Null Then
m_sentence:='begin :1:='||m_exec_func||'('||i_bill_id||'); end;';
Execute Immediate m_sentence Using Out Result;
End If;
Commit;
else
rollback;
end if;
Else
Result:=-2;
o_err_msg:='取不到下一步的去处';
Rollback;
End If;
---非动态函数调用
result:=wf_f_gonextstep(i_model_id,i_bill_id,m_goto_step,i_deal_manid);
if Result=0 then
Select exec_func Into m_exec_func From wf_stepdeal Where deal_id=i_deal_id;
If m_exec_func Is Not Null Then
m_sentence:='begin :1:='||m_exec_func||'('||i_bill_id||'); end;';
Execute Immediate m_sentence Using Out Result;
End If;
Commit;
else
rollback;
end if;
Else
Result:=-2;
o_err_msg:='取不到下一步的去处';
Rollback;
End If;
---非动态函数调用
result:=wf_f_gonextstep(i_model_id,i_bill_id,m_goto_step,i_deal_manid);