Monday, December 01, 2008

How to view the buffered output using oracle stored procedure

CREATE OR REPLACE procedure ExtractEmpInfo
(
EmpName in varchar2,
cv_results in out sys_refcursor
)
IS

begin
open cv_results for
Select * from Employee where EmplyoeeName=EmpName;
End;

If you want to see the output.

Go To -> TOAD --> Stored Procedure --> Right Click Execute Procedure
->Now Parameters window will open
->Enter the Arguments except Cursor
->click Options Button
->Now Output Options window will open
->Select Load into grid from memory option.
->Now Click OK..You can view the results in the grid.

No comments: