anumoses
asked on
calling a package function in oracle that has in and out parameter in a script
I have a package called
PKG_ESTIMATED_FREIGHT. This has a function called GET_ESTIMATED_FREIGHT
Function parameters are in_ship_id,in_recshp_id ( both are in parameters) one out parameter is out_method
I have a script and I need to call this function. How do I call that has an out parameter?
script is order_freight.
INSERT INTO adwaram.order_freight(ship _id,
estimated_freight
-
-
-)
values(in_ship_id,
,DSS.PKG_ESTIMATED_FREIGHT .GET_ESTIM ATED_FREIG HT(NULL,c_ inbound_re c.recshp_i d,v_method )
-
-
-
-
)
v_method I have declared as varchar2(2000);
getting an error
ORA-06572: Function GET_ESTIMATED_FREIGHT has out arguments
ORA-06512: at line 111
PKG_ESTIMATED_FREIGHT. This has a function called GET_ESTIMATED_FREIGHT
Function parameters are in_ship_id,in_recshp_id ( both are in parameters) one out parameter is out_method
I have a script and I need to call this function. How do I call that has an out parameter?
script is order_freight.
INSERT INTO adwaram.order_freight(ship
estimated_freight
-
-
-)
values(in_ship_id,
,DSS.PKG_ESTIMATED_FREIGHT
-
-
-
-
)
v_method I have declared as varchar2(2000);
getting an error
ORA-06572: Function GET_ESTIMATED_FREIGHT has out arguments
ORA-06512: at line 111
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@slightwv
Thanks for the correction.
In a case this function will return 2 values ( 1 is return value and the out parameter)
fval := DSS.PKG_ESTIMATED_FREIGHT. GET_ESTIMA TED_FREIGH T(NULL,c_i nbound_rec .recshp_id ,v_method);
and the insert should have v_method variable as per the requirement. if the user needs return value to insert then this is good.
INSERT INTO adwaram.order_freight(ship _id,estima ted_freigh t) values (in_ship_id, v_method);
Thanks for the correction.
In a case this function will return 2 values ( 1 is return value and the out parameter)
fval := DSS.PKG_ESTIMATED_FREIGHT.
and the insert should have v_method variable as per the requirement. if the user needs return value to insert then this is good.
INSERT INTO adwaram.order_freight(ship
ASKER
thanks
Open in new window