plsql - Getting an error while trying to update the column of a table by calling a function to set it s value :PLS-00231 -
here's update statement that's throwing error:
pls-00231: function 'f_get_mustgo_lookahead' may not used in sql
update gt_network gt set u_look_ahead = f_get_mustgo_lookahead(gt.u_smart_cd, gt.u_must_go_multi), u_must_go = f_get_mustgo_lookahead(gt.u_smart_cd, gt.u_look_ahead_multi);
f_get_mustgo_lookahead
private function , parameters have been passed function column values table.
function f_get_mustgo_lookahead --f_get_mustgo_lookahead function takes input parameters smart_code , multiplier , returns value u_must_go , u_look_ahead (in_smart_code in varchar2, in_multiplier in float) return number l_type_mustgo_lookahead number; begin select (closedt.eff - opendt.eff) l_type_mustgo_lookahead (select eff (select eff scpomgr.caldata cal=in_smart_code , opt=1 order eff )where rownum=1) opendt, (select eff from(select eff scpomgr.caldata cal=in_smart_code , opt=2 order eff )where rownum=1) closedt closedt.eff > opendt.eff ; return (l_type_mustgo_lookahead * in_multiplier); exception when no_data_found return 0; end f_get_mustgo_lookahead;
you cannot call private function sql. needs defined in package specification if in package or needs schema-level.
Comments
Post a Comment