How to convert the varray to ref cursor

Hi,
Is there any way to convert varray to ref cursor....
i dont want to use any table or record as an ref cursor..
i just want to create a procedure which returns a ref cursor..
below is the sample procedure for it..
create or replace procedure FETCH_DATA1
tab_name in varchar2,
p_recordset1 OUT fetch_data_pak.ref_cursor
AS
type v_array1 is varray(1000) of t_transaction%rowtype;
v_array2 v_array1;
cursor s1 is select * from t_transaction where lastupdate_date > '08-Aug-09';
begin
open s1;
fetch s1 bulk collect into v_array2 limit 100;
close s1;
select * from table(cast (v_array2 as p_recordset1));
end FETCH_DATA1;
I need to convert the varray to ref cursor.....

Why put it into a varray at all?
You can just open the ref cursor for that select you are desiring.
And if you need to limit it to returning just the first 100 (as your code seems to imply), wrap it and filter on rownum.
Something similar to this:
create or replace procedure FETCH_DATA1
  tab_name in varchar2,
  p_recordset1 OUT fetch_data_pak.ref_cursor
AS
begin
  open p_recordset1 for
  select /*+ first_rows(100) */ * from (
    select * from t_transaction
    where lastupdate_date > to_date('08-08-2009','DD-MM-YYYY')
    --order by something
  where rownum <= 100;
end FETCH_DATA1;And note, that you really should have an order by when you wish to limit yourself to "first 100 rows" - otherwise it will be "random 100 rows".
That goes for your cursor solution as well...
Edited by: Kim Berg Hansen on Nov 28, 2011 10:25 AM
Added explicit date conversion - it is bad practice not to explicitly convert dates ;-)

Similar Messages

  • How to convert the javasource file(*.class) to execute file(*.exe)?

    How to convert the javasource file(*.class) to execute file(*.exe)?
    thank you!

    Although i have seen a few programs (that are platform specific) that will embed a small jvm into an exe with your class file, it is generally excepted that you cannot create an executable file using java. The JAR executable file is probably the closest your going to get
    Pete

  • I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?

    I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
    Thank you

    So it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB

  • How to convert the character value to currency/numeric

    Hi,
    See the sample code here
    data: v_qtr_field(7).
    data: w_low_limit like glt0-kslvt,
          w_amount like glt0-hslvt.
    w_low_limit = 02.
    w_max_period = 3.
    concatenate 'HSL' w_low_limit into v_qtr_field.
    *comment
    *I am looking for a field formation thru above code like in GLT0 table like HSL02,HSL03 *etc based on the value user entered in the selection *screen
    DO w_max_period TIMES
      VARYING w_amount FROM v_qtr_field NEXT v_qtr_field + 1.
       t_trans_values-dmbe2 = t_trans_values-dmbe2 + w_amount.
      ENDDO.
    I am facing problem in the Do loop as it wont allows multiple data types. can you suggest me how to convert the v_qtr_field whose data type is character to currency?

    Hi,
    Please check this code .
    PERFORM write_currency
                  USING buf_anla-urwrt t_dates-waers t_txw_anla-urwrt.
    *       FORM WRITE_CURRENCY                                           *
    *       convert currency amount to string                             *
    *       - use decimal point                                           *
    *       - remove separator characters                                 *
    *  -->  P_AMOUNT                                                      *
    *  -->  P_CURRENCY_UNIT                                               *
    *  -->  P_STRING                                                      *
    FORM WRITE_CURRENCY
         USING P_AMOUNT        TYPE P
               P_CURRENCY_UNIT LIKE TCURC-WAERS
               P_STRING        TYPE C.
      DATA: DEC2POINT(2) TYPE C VALUE ',.'.
    * convert separator to decimal point
      WRITE P_AMOUNT TO P_STRING CURRENCY P_CURRENCY_UNIT
            NO-GROUPING
            NO-SIGN
            LEFT-JUSTIFIED.
      TRANSLATE P_STRING USING DEC2POINT.
    * put minus sign before number
      IF p_amount < 0.
        SHIFT P_STRING RIGHT.
        P_STRING(1) = '-'.
      ENDIF.
    ENDFORM.
    <i>Hope This Info Helps YOU.</i>
    Regards,
    Lakshmi

  • How to convert the Report Builder output to .xls

    Dear All,
    Let me please know how to convert the Report Builder output to Excel Format.
    As there are having the facility to convert the output in .PDF or .HTML format but i want to convert that into Excel Sheet......
    Please Guide me in this regards
    Thanks in advance
    Regards,
    Vishal......

    Hello,
    If your question is about the format spreadsheet, it is not possible from Reports Builder :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwwhthow/whatare/output/output_a_simpleexcel.htm
    Restrictions
    It is not possible to generate spreadsheet output directly from Reports Builder. Instead, on the command line, you can run the report using rwrun or Reports Server clients (rwservlet, rwclient, rwcgi), with DESFORMAT=SPREADSHEET. You cannot store DESFORMAT=SPREADSHEET as a system parameter value in the report definition (.rdf file).
    Regards

  • How to convert the class in the one package to same class in the other pack

    How to convert the class in the one package to same class in the other package
    example:
    BeanDTO.java
    package cho3.hello.bean;
    public class BeanDTO {
    private String name;
    private int age;
    * @return
    public int getAge() {
         return age;
    * @return
    public String getName() {
         return name;
    * @param i
    public void setAge(int i) {
         age = i;
    * @param string
    public void setName(String string) {
         name = string;
    BeanDTO.java in other package
    package ch03.hello;
    public class BeanDTO {
    private String name;
    private int age;
    * @return
    public int getAge() {
         return age;
    * @return
    public String getName() {
         return name;
    * @param i
    public void setAge(int i) {
         age = i;
    * @param string
    public void setName(String string) {
         name = string;
    My converter lass lokks like
    public class BeanUtilTest {
         public static void main(String[] args) {
              try
                   ch03.hello.BeanDTO bean=new ch03.hello.BeanDTO();
              bean.setAge(10);
              bean.setName("mahesh");
              cho3.hello.bean.BeanDTO beanDto=new cho3.hello.bean.BeanDTO();
              ClassConverter classconv=new ClassConverter();
              //classconv.
              System.out.println("hi "+beanDto.getClass().toString());
              System.out.println("hi helli "+bean.toString()+" "+bean.getAge()+" "+bean.getName()+" "+bean.getClass());
              Object b=classconv.convert(beanDto.getClass(),(Object)bean);
              System.out.println(b.toString());
              beanDto= (cho3.hello.bean.BeanDTO)b;
              System.out.println(" "+beanDto.getAge()+" "+beanDto.getName() );
              }catch(Exception e)
                   e.printStackTrace();
    But its giving class cast exception. Please help on this..

    Do you mean "two different layers" as in separate JVMs or "two different layers" as in functional areas running within the same JVM.
    In either case, if the first class is actually semantically and functionally the same as the second (and they are always intended to be the same) then import and and use the first class in place of the second. That's beyond any question of how to get the data of the first into the second if and when you need to.
    Once you make the breakthrough and use one class instead of two I'd guess that almost solves your problem. But if you want to describe your architecture a little that would help others pin down want you're trying to do.

  • How to convert the report english to germany in abap

    Hi guys,
    How to convert the report english to germany in abap and any manual code or function module.
    please give the solution.

    you need to maintain all the text in text element and maintain text translation..
    goto> translations

  • How to Convert the Warning Message to Error Message in Standard Transaction

    Hi,
        I face one problem in Standard Transaction Code CS02. In that  by entering the material Number, Plant, bomstatus press enter. it gives a warning message. How to convert the Warning message to Error. In abap how to do that. Please help me.

    Mohan,
    It appears that there is some configuration you can do for BOM Message types to change the message type.  The IMG link for this function is:
    Production->Basic Data->Bill of Material->General Data->Change Message Type
    However you need to read the IMG documentation to see if this will work for you.  There are only certain messages that can be changed with this configuration step.
    Also, please do not double post questions in the forums.
    Best Regards,
    Chris H.

  • How to convert the counter input as a RPM

    Hello NI,
                          Could you tell me. how to convert the Counter input to the RPM. I am using Rotary encoder has a 5V amplitude with 500 PPR. i am going to measure the Engine speed as a rpm.
    I am using third party hardware, from the hardware i can get the Count as well as Frequency also.
    Could you suggest to me...?  i looked out some disscussion in these forum but i cant able to understand.
    can you please explain with simple way....
    if you have any simulation send me....
    Regards,
    Balaji DP

    Hi balaji,
    [email protected] wrote:
    ...I am using third party hardware, from the hardware i can get the Count as well as Frequency also.
    If you're able to read frequency as X pulses/sec(?) that seems to convert RPM as follows:
    X (pulse/sec) * 1/500 (rev/pulse) * 60 (sec/min) = X * 60/500 RPM (???)
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Does anyone know how to convert the output from the standard report to xml?

    Does anyone know how to convert the output from the standard SAP report to xml?

    since it a standard report which you cannot modify you can only do the following.
    submit report exporting list to memory
    then
    list from memory and then
    use the returned itab along with CALL TRNSFORMATION key word to convert to xml.
    but this only going to place the whole list content (including data and formating lines,etc) into a xml element and not the actual data alone in the list .

  • How to convert the CS6 MAC version to the Windows version?

    I followed the advice to go to go/getserial, but the productcode i entered was "invalid", but the figures i entered are correct. What now ?

    Thank you for the tip, but I only get to : ask the community..   No
    contact with any agent.
    Pat Willener schreef op 19/09/2014 11:25:
    >
          How to convert the CS6 MAC version to the Windows version?
    created by Pat Willener <https://forums.adobe.com/people/pwillener> in
    /Downloading, Installing, Setting Up/ - View the full discussion
    <https://forums.adobe.com/message/6744036#6744036>

  • How to convert the cursor to lens

    Hi anyone here can help me
    I have developed an application which opens the FITS Images(Flexible Image Transform System- which is used to open astronomical images) . Now i need to convert the cursor to lens means as and when the cursor moves on the image that portion of the image should be zoomed up.
    After browsing in the net i could come across the below coding, but it is not working. Whats wrong with code? Is there any other method to do so? Could anyone suggest some useful websites where i can get enough imformation about it?
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class DetachedMagnifyingGlass extends JComponent
    implements MouseMotionListener {
    double zoom;
    JComponent comp;
    Point point;
    Dimension mySize;
    Robot robot;
    public DetachedMagnifyingGlass (JComponent comp,
    Dimension size,
    double zoom) {
    this.comp = comp;
    // flag to say don't draw until we get a MouseMotionEvent
    point = new Point (-1, -1);
    comp.addMouseMotionListener(this);
    this.mySize = size;
    this.zoom = zoom;
    // if we can't get a robot, then we just never
    // paint anything
    try {
    robot = new Robot();
    } catch (AWTException awte) {
    System.err.println ("Can't get a Robot");
    awte.printStackTrace();
    public void paint (Graphics g) {
    if ((robot == null) || (point.x == -1))
    g.setColor (Color.blue);
    g.fillRect (0, 0, mySize.width, mySize.height);
    return;
    Rectangle grabRect = computeGrabRect();
    BufferedImage grabImg = robot.createScreenCapture (grabRect);
    Image scaleImg =
    grabImg.getScaledInstance (mySize.width, mySize.height, Image.SCALE_FAST);
    g.drawImage (scaleImg, 0, 0, null);
    private Rectangle computeGrabRect() {
    // width, height are size of this comp / zoom
    int grabWidth = (int) ((double) mySize.width / zoom);
    int grabHeight = (int) ((double) mySize.height / zoom);
    // upper left corner is current point
    return new Rectangle (point.x, point.y, grabWidth, grabHeight);
    public Dimension getPreferredSize() { return mySize; }
    public Dimension getMinimumSize() { return mySize; }
    public Dimension getMaximumSize() { return mySize; }
    // MouseMotionListener implementations
    public void mouseMoved (MouseEvent e) {
    Point offsetPoint = comp.getLocationOnScreen();
    e.translatePoint (offsetPoint.x, offsetPoint.y);
    point = e.getPoint();
    repaint();
    public void mouseDragged (MouseEvent e) {
    mouseMoved (e);
    }

    if you return to the Swing Forum's main page, read the other subject titles, one of them might catch your attention

  • How to get values from a ref cursor in a procedure

    I have a procedure that returns a cursor type of values, but I cannot get the values.
    I got error when on how to define the output cursor. Could someone please look at the code and tell me how to correct it?
    Thanks in advance.
    ******************************8
    --This is the package
    CREATE OR REPLACE PACKAGE Test_SECURITY2 as
    type T_RoleTest is ref cursor;
    Procedure P_GetUserRole(userID in number, p_cur out T_RoleTest);
    end;
    CREATE OR REPLACE PACKAGE BODY Test_SECURITY2 as
    Procedure P_GetUserRole(userID in number, p_cur out T_RoleTest) as
    begin
         open p_cur for
         select PREO_Role.ROLE_ID,PREO_Role.ROLE_NAME
         from preorder.PREO_Role, preorder.PREO_User_Role
         where PREO_Role.Role_id = PREO_User_Role.Role_id
         and PREO_User_Role.user_id = userid;
    end;
    end;
    --This is the testing code. I got error here
    SQL> set serveroutput on;
    SQL> execute dbms_output.enable;
    PL/SQL procedure successfully completed.
    SQL> declare
    2 type T_RoleTest is ref cursor;
    3 V_UserRole is ref cursor; --how to define the output cursor
    4 v_userId number := 42;
    5 V_Role_Id number;
    6 v_Role_name varchar2(20);
    7 begin
    8 Test_SECURITY2.P_GetUserRole(v_userId, V_UserRole);
    9
    10 open V_UserRole;
    11 loop
    12 fetch V_UserRole into V_Role_Id, v_Role_name;
    13
    14 EXIT WHEN V_UserRole%NOTFOUND;
    15 dbms_output.put_line('RoleID'||v_Role_ID);
    16 dbms_output.put_line('Rolename'||v_Role_name);
    17
    18 end loop;
    19
    20 end;
    21 /
    V_UserRole is ref cursor;
    ERROR at line 3:
    ORA-06550: line 3, column 13:
    PLS-00103: Encountered the symbol "IS" when expecting one of the following:
    constant exception <an identifier>

    declare
      type T_RoleTest is ref cursor;
      v_UserRole T_RoleTest;or just:
    declare
      v_UserRole  Test_Security2.T_RoleTest;And, if you are on 9i or later, you can just use the built-in sys_refcursor type.

  • How to retrieve data from a REF CURSOR using OCI 8.0?

    I found an example in Oracle docs (shown below) that discusses how to bind a REF CURSOR for later data retrieval, but it does not explain actually how to do the later data retrieval.
    I hope someone can explain it to me. Thanks
    The OCI provides the ability to bind and define PL/SQL REF CURSORs and nested tables. An application can use a statement handle to bind and define these types of variables. As an example, consider this PL/SQL block:
    static const text plsql_block = (text )
    "begin \
    OPEN :cursor1 FOR SELECT empno, ename, job, mgr, sal, deptno \
    FROM emp_rc WHERE job=:job ORDER BY empno; \
    OPEN :cursor2 FOR SELECT * FROM dept_rc ORDER BY deptno; \
    end;";
    An application would allocate a statement handle for binding, by calling OCIHandleAlloc(), and then bind the :cursor1 placeholder to the statement handle, as in the following code, where :cursor1 is bound to stm2p. Note that the handle allocation code is not included here.
    err = OCIStmtPrepare (stm1p, errhp, (text *) nst_tab, strlen(nst_tab),
    OCI_NTV_SYNTAX, OCI_DEFAULT);
    err = OCIBindByName (stm1p, (OCIBind **) bndp, errhp,
    (text *)":cursor1", (sb4)strlen((char *)":cursor1"),
    (dvoid *)&stm2p, (sb4) 0, SQLT_RSET, (dvoid *)0,
    (ub2 *)0, (ub2 *)0, (ub4)0, (ub4 *)0, (ub4)OCI_DEFAULT);
    In this code, stm1p is the statement handle for the PL/SQL block, while stm2p is the statement handle which is bound as a REF CURSOR for later data retrieval. A value of SQLT_RSET is passed for the dty parameter.

    ( sorry, i forgot the Link where i get this html fiLes, so i just copy-paste here )
    ( maybe it can heLp you a bit. -- it's heLp me, for sure )
    And the following is thanks to Brett Rosen :
    I noticed that you didn't have an OCI entry
    on http://osi.oracle.com/~tkyte/ResultSets/index.html .
    Here is OCI code to do this (Oracle 81) if you want to include it on
    that page.
    Some error checking and cleanup has been removed, but the below should
    work. (once dbname has been replaced appropriately)
    Brett
    int main(int argc, char* argv[])
    OCIError* pOciError;
    char* pConnectChar = "dbname";
    char* pUsernameChar = "scott";
    char* pPasswordChar = "tiger";
    int answer;
    OCIStmt* pOciStatement;
    char* sqlCharArray = "BEGIN :success := sp_ListEmp; END;";
    int id;
    char ename[40];
    OCIEnv* g_pOciEnvironment = NULL;
    OCIServer* g_pOciServer = NULL;
    OCISession* g_pOciSession = NULL;
    OCISvcCtx* g_pOciServiceContext = NULL;
    sb2* pIndicator=0;
    sb2* pIndicator2=0;
    sb2* pIndicator3=0;
    OCIDefine* pOciDefine;
    OCIDefine* pOciDefine2;
    OCIBind* pBind;
    OCIStmt* cursor;
    answer = OCIInitialize(OCI_THREADED, NULL, NULL, NULL, NULL);
    answer = OCIEnvInit(&g_pOciEnvironment, OCI_DEFAULT, 0, NULL);
    answer = OCIHandleAlloc(g_pOciEnvironment, (void **)&pOciError, OCI_HTYPE_ERROR, 0, NULL);
    answer = OCIHandleAlloc(g_pOciEnvironment, (void **)&g_pOciSession, OCI_HTYPE_SESSION, 0, NULL);
    answer = OCIHandleAlloc(g_pOciEnvironment, (void **)&g_pOciServer, OCI_HTYPE_SERVER, 0, NULL);
    answer = OCIHandleAlloc(g_pOciEnvironment, (void **)&g_pOciServiceContext, OCI_HTYPE_SVCCTX, 0, NULL);
    answer = OCIServerAttach(g_pOciServer, pOciError, (unsigned char *)pConnectChar, strlen(pConnectChar),
    OCI_DEFAULT);
    answer = OCIAttrSet(g_pOciSession, OCI_HTYPE_SESSION, (unsigned char *)pUsernameChar, strlen(pUsernameChar),
    OCI_ATTR_USERNAME, pOciError);
    answer = OCIAttrSet(g_pOciSession, OCI_HTYPE_SESSION, (unsigned char *)pPasswordChar, strlen(pPasswordChar),
    OCI_ATTR_PASSWORD, pOciError);
    answer = OCIAttrSet(g_pOciServiceContext, OCI_HTYPE_SVCCTX, g_pOciServer, 0, OCI_ATTR_SERVER, pOciError);
    answer = OCIAttrSet(g_pOciServiceContext, OCI_HTYPE_SVCCTX, g_pOciSession, 0, OCI_ATTR_SESSION, pOciError);
    answer = OCISessionBegin(g_pOciServiceContext, pOciError, g_pOciSession, OCI_CRED_RDBMS, OCI_DEFAULT);
    answer = OCIHandleAlloc(g_pOciEnvironment, (void **)(&pOciStatement), OCI_HTYPE_STMT, 0, NULL);
    answer = OCIStmtPrepare(pOciStatement, pOciError, (unsigned char *)sqlCharArray, strlen(sqlCharArray),
    OCI_NTV_SYNTAX, OCI_DEFAULT);
    answer = OCIHandleAlloc(g_pOciEnvironment, (void **)(&cursor), OCI_HTYPE_STMT, 0, NULL);
    answer = OCIBindByPos(pOciStatement,&pBind, pOciError, 1, &cursor, 0,SQLT_RSET,
    pIndicator2, 0,NULL, 0,0,OCI_DEFAULT);
    answer = OCIStmtExecute(g_pOciServiceContext, pOciStatement, pOciError, 1, 0, NULL, NULL,
    OCI_COMMIT_ON_SUCCESS);
    answer = OCIDefineByPos(cursor,&pOciDefine, pOciError,2,&id,sizeof(int),
    SQLT_INT,pIndicator, 0, 0,OCI_DEFAULT);
    answer = OCIDefineByPos(cursor,&pOciDefine2, pOciError,1,ename,40,
    SQLT_STR,pIndicator3, 0, 0,OCI_DEFAULT);
    if (answer == 0)
    while ((answer = OCIStmtFetch(cursor,pOciError, 1,OCI_FETCH_NEXT,OCI_DEFAULT)) == 0)
    printf("fetched id %d and name %s\n",id,ename);
    answer = OCIHandleFree(pOciError, OCI_HTYPE_ERROR);
    return 0;
    }

  • How to get rowtype of a ref cursor?

    Hello again,
    I need your help once more.
    I have a function in a package which returns a SYS_REFCURSOR. Now I am trying to open that cursor from the application (currently sql_developer) to show the data. For starting I have a simple query in the statement: select * from emp;
    Later it will be a complex query which returns results of multiple joined tables.
    I have the following package:
    >
    CREATE OR REPLACE
    PACKAGE P_TEST_ASP AS
    FUNCTION test_asp_1 (dti_id in NUMBER)
    RETURN SYS_REFCURSOR;
    END P_TEST_ASP;
    >
    And here comes the package body:
    >
    CREATE OR REPLACE
    PACKAGE BODY P_TEST_ASP AS
    FUNCTION test_asp_1 (dti_id in NUMBER)
    RETURN SYS_REFCURSOR AS
    resultCursor SYS_REFCURSOR;
    BEGIN
    OPEN resultCursor FOR select * from emp;
    RETURN resultCursor;
    END test_asp_1;
    END P_TEST_ASP;
    >
    Now my Problem is that I do not know how to get the cursor's rowtype to assign it to the collection:
    I Managed to access the cursor when I set the rowtype of my collection res to emp%rowtype.
    >
    set serveroutput on
    DECLARE
    type        testtype is TABLE OF emp%rowtype;
    myCursor SYS_REFCURSOR;
    res testtype;
    BEGIN
    -- Get ref cursor from function
    myCursor := p_test_asp.test_asp_1(9);
    FETCH myCursor BULK COLLECT into res;
    dbms_output.put_line('Value from cursor:' );
    CLOSE myCursor;
    END;
    >
    But that will not work with the final statement.
    I would like to set the rowtype to myCursor%rowtype -> But I don't know how to do it:
    >
    set serveroutput on
    DECLARE
    type        testtype is TABLE OF myCursor%rowtype;
    myCursor SYS_REFCURSOR;
    res testtype;
    BEGIN
    -- Get ref cursor from function
    myCursor := p_test_asp.test_asp_1(9);
    FETCH myCursor BULK COLLECT into res;
    dbms_output.put_line('Value from cursor:' );
    CLOSE myCursor;
    END;
    >
    this statement throws the following errors:
    Fehlerbericht:
    ORA-06550: line 2, column 36:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 2, column 3:
    PL/SQL: Item ignored
    ORA-06550: line 11, column 36:
    PLS-00597: expression 'RES' in the INTO list is of wrong type
    ORA-06550: line 11, column 3:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    Edited by: Andreas S. on 13.12.2011 04:56

    Why do you want to use a collection? I dont see any need for that.
    Lets say your client is SQL Plus. SQL Plus provides a API called PRINT that prints the cursor. You can use that.
    SQL> var rc refcursor
    SQL>
    SQL> exec open :rc for select level from dual connect by level <= 10;
    PL/SQL procedure successfully completed.
    SQL> print rc
         LEVEL
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.
    SQL>Like wise whatever is your client use the correct API that offers to handle cursors.

Maybe you are looking for