Link to home
Start Free TrialLog in
Avatar of superthumper
superthumper

asked on

Oracle SQL - Call a stored procedure with a cursor out parameter

I have a stored procedure I'm using to return a recordset with a cursor as an out parameter  to return a recordset.  I'm seeing some strange data when I bring the data into Crystal Reports.   In the SQL server world, I'd just go directly to Management Studio, open a 'new query' and execute the procedure... but in SQL server I don't need to use a cursor to return a recordset, I just 'DO' the select.  How see the results in 'Oracle SQL Developer' the same way I would in sql server management studio (or the old 'query analyzer') ???
Avatar of Mike McCracken
Mike McCracken

Oracle requires a ref cursor as the first parameter returned to the report.

This article is a little old but it is still valid
http://support.businessobjects.com/library/kbase/articles/c2001157.asp

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of sventhan
sventhan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of superthumper

ASKER

Does it really have to be that much more complicated with Oracle than SQL Server?  I just want to see if my procedure works and returns sensical data.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you are just wanting to run a procedure which returns a ref cursor and you want to see the content of that ref cursor, you can do that in SQLPlus.  Here is how ...

http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/ch6.htm#i1211948

once there, go to
Example 6-15 Using REFCURSOR Variables in Stored Procedures
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial