anumoses
asked on
Orale one time sql script
ORACLE ONE TIME SQL SCRIPT
I have a script where I call for a package.procedure as below
My question is about the out_message. In the package I have the code as
In my script I want to put a dbms output to get something like this. How can I do that?
load_inventory.sql
I have a script where I call for a package.procedure as below
FUNCTION get_disp (in_bltitm_id IN NUMBER,
in_cust_id IN NUMBER,
in_proj_id IN NUMBER ,
in_return_to_wc IN VARCHAR2 ,
in_tab_result_spec IN t_result_spec ,
in_dehdr_id IN NUMBER,
out_message OUT VARCHAR2 ,
out_tab_disp IN OUT t_disp)
RETURN NUMBER
My question is about the out_message. In the package I have the code as
IF out_success = 0
THEN
out_message :=
'An error occurred processing dispositions. Information sent to the IT department.';
ELSIF out_success = 1
THEN
out_message := 'No disposition found for the item.';
ELSIF out_success = 2
THEN
out_message := 'Disposition found and processed successfully.';
In my script I want to put a dbms output to get something like this. How can I do that?
load_inventory.sql
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I kid of added this
Instead of v_success := calling the package, I used v_get_disp. and the below.
IF v_get_disp = 2 THEN
v_success := TRUE;
v_cnt := v_cnt + 1;
dbms_output.put_line('Disp
ELSIF v_get_disp = 1 THEN
v_success := false;
v_cnt1 := v_cnt1 + 1;
dbms_output.put_line('Ther
ELSE
v_success:=false;
v_cnt1 := v_cnt1 + 1;
dbms_output.put_line('Erro
END IF;