November 10, 2010 at 8:35 am
I need to write some tests scripts to test a stored procedure in Oracle that returns a reference cursor to the user.
create or replace procedure my_oracleProc (
results_cursor OUT sys_refcursor ,
p_remote_user IN VARCHAR2 ,
p_remote_address IN VARCHAR2 )
...
The Oracle documentation sucks, and doesn't help me figure out how to write a script to call my procedure and then test the return values of the results_cursor.
Any help would be greatly welcomed.
November 12, 2010 at 3:35 pm
Okay, figured out a way to test the stored procedure and check the result set returned in the sys_refcursor without writing any sql code. Used the TEST feature in PS/SQL Developer. You are able to inspect the values in the cursor by selecting the ellipses next to that parameter.
November 12, 2010 at 4:20 pm
November 12, 2010 at 5:19 pm
John Rowan (11/12/2010)
Gotta love it when you have to answer your own question 🙂
Yep, unfortunately it doesn't solve the overall problem, which is being able to write scripts to test code programmatically. Would still like to know how to do that using Oracle, but as I said, the Oracle documentation sucks.
November 15, 2010 at 9:42 am
Wish I could help, I haven't touched (or thought about) Oracle in 6 years....but back when I worked in Oracle, I used the metalink site for support...learned alot there.
March 21, 2011 at 12:37 am
Did you figure this out?
If not here is a link that should get you going: http://www.oracle-base.com/articles/misc/UsingRefCursorsToReturnRecordsets.php
You gotta love Oracle... 😉
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply