Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Location
    Hyderabad
    Posts
    4

    Thumbs up Unanswered: ref curosr...oracle gurus cumOn..describe it

    I had a ref cursor in my procedure as a IN OUT parameter....
    Now i wanna print the values of ref cursor used in procedure...
    i don't want to use declare x ref cursor.->exec a(:x); tell me sql file solution....
    wating for quick respoonse....
    cheers

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: ref curosr...oracle gurus cumOn..describe it

    I don't understand... You say you "don't want to use declare x ref cursor.->exec a(:x);"

    So what do you want to do?

    This is one way:

    SQL> var x refcursor
    SQL> exec a(:x)
    SQL> print x

  3. #3
    Join Date
    Dec 2003
    Location
    India
    Posts
    12
    You can use the following script
    DECLARE
    TYPE ABC IS RECORD(
    x VARCHAR2(12)
    ,y VARCHAR2(1));
    abc1 ABC;
    cv Package_name.Ref Cursor name;
    BEGIN
    -- Execute the procudure here
    Package Name.Procedure name (
    pass the parameter here
    ,cv -- Ref Cursor
    );

    LOOP
    FETCH cv INTO abc1;
    EXIT WHEN cv%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE (abc1.X
    || ' '||abc1.Y
    ;


    END LOOP;
    CLOSE cv;
    END;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •