Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SP return Cursor
Hello all,
I'm using Oracle 9i and I have some stored procedures returning
Cursors. I'd like to test a SP by just calling it an see if there
is a result in the cursor. The problem is that in some cases I
don't know the format of the result cursor or in some cases the
cursor has a lot of rows. I don't want to fetch into a lot of
variables with the correct types.
This is such an example:
crs_kpi Usertype.ref_cursor;
BEGIN SP_WEB_MES(
P_I_SCALE => 'H', P_V_MULTISOURCE => 'NORMAL', P_V_TYPE => 'NORMAL', P_V_STATUS => 1,
/* --error--
for v_mes in crs_mes loop
dbms_output.put_line(v_mes.ID);
end loop;
*/
END;
But this is not working. I know there is a row ID. Is there a wach to fetch only the ID?
The Usertype.ref_cursor is defined as:
TYPE ref_cursor IS REF CURSOR;
END usertype;
/
![]() |
![]() |