Home » SQL & PL/SQL » SQL & PL/SQL » how to get a result set from function or procedure?
how to get a result set from function or procedure? [message #37640] Mon, 18 February 2002 15:46 Go to next message
Joy
Messages: 21
Registered: November 2001
Junior Member
how to get a result set from function or procedure?
Re: how to get a result set from function or procedure? [message #37641 is a reply to message #37640] Mon, 18 February 2002 17:06 Go to previous message
seng
Messages: 191
Registered: February 2002
Senior Member
You can call DBMS package to generate output on screen when procedure/function is called. Below is the sample program to generate the output (i found this method from other programmer).

********************
*** sample code ****
declare
debug varchar(1) := 'Y'
resultSet varchar(4); -- return value
begin
<program code to use resultset>
if debug = 'Y' then
dbms_output.put_line(resultset);
<program code>
end ;

*** sample code ****
********************

after you call this function / procedure, the output will generate if you set debug = 'Y' . this is a method to debug the program in PL/SQL ... Hope this will help you . Thanks
Previous Topic: help installing SQLPlus Help
Next Topic: Want to Know about insert
Goto Forum:
  


Current Time: Fri Apr 19 15:55:26 CDT 2024