Home » SQL & PL/SQL » SQL & PL/SQL » How to test the Procedure
How to test the Procedure [message #37845] Sun, 03 March 2002 19:30 Go to next message
diaz
Messages: 58
Registered: October 2001
Member
hi,
how to test the stored proc has out parameter from the sql worksheet ? (the out parameter is a cursor)
Can you give some example ?
Thank You
Re: How to test the Procedure [message #37846 is a reply to message #37845] Sun, 03 March 2002 23:13 Go to previous messageGo to next message
seng
Messages: 191
Registered: February 2002
Senior Member
This is one of method to get the output.

************************************
declare
v1 number; -- same type as your output parameter.
begin
v1 = p(); -- your procedure.
DBMS_OUTPUT.PUT_LINE( 'output : '|| to_char(v1)); -- because the v1 is number.
end;
************************************

Beside this some of tool is able to get the output with out do anything.

Hope this is helping you. thanks
Re: How to test the Procedure [message #37877 is a reply to message #37845] Mon, 04 March 2002 17:18 Go to previous message
seng
Messages: 191
Registered: February 2002
Senior Member
If you are using SQLPLUS then you need this

SET SERVEROUTPUT ON;
Previous Topic: test procedure
Next Topic: difference????
Goto Forum:
  


Current Time: Wed Apr 24 06:17:56 CDT 2024