Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    42

    Unanswered: what is the wrong with this plsql block.

    Hi,

    iam writing a procedure which returns a cursor as out parameter, now i want to try to run the application from sql Prompt. the following code iam using, i dont know what is the error in that block, actually i have 4 input parameters and one output parameter which i s a cursor. The procedure returns a cursor which contains 19 values, thats why i created 19 variables.

    DECLARE
    OV1 DUMMY.REF_CURSOR;
    VAR1 VARCHAR2(50);
    VAR2 VARCHAR2(50);
    VAR3 VARCHAR2(50);
    VAR4 VARCHAR2(50);
    VAR5 VARCHAR2(50);
    VAR6 VARCHAR2(50);
    VAR7 VARCHAR2(50);
    VAR8 VARCHAR2(50);
    VAR9 VARCHAR2(50);
    VAR10 VARCHAR2(50);
    VAR11 VARCHAR2(50);
    VAR12 VARCHAR2(50);
    VAR13 VARCHAR2(50);
    VAR14 VARCHAR2(50);
    VAR15 VARCHAR2(50);
    VAR16 VARCHAR2(50);
    VAR17 VARCHAR2(50);
    VAR18 VARCHAR2(50);
    VAR19 VARCHAR2(50);
    BEGIN
    DUMMY.SP_DUMMYACTIVITY('12-APR-2003','12-AUG-2003','RECEIVED','UMBUNI120403171212.txt',DUMMY.RE F_CURSOR);
    FETCH OV1 INTO VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14,
    VAR15, VAR16, VAR17, VAR18, VAR19;
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR1, 'JUNK1') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR2, 'JUNK2') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR3, 'JUNK3') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR4, 'JUNK4') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR5, 'JUNK5') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR6, 'JUNK6') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR7, 'JUNK7') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR8, 'JUNK8') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR9, 'JUNK9') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR10, 'JUNK10') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR11, 'JUNK11') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR12, 'JUNK12') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR13, 'JUNK13') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR14, 'JUNK14') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR15, 'JUNK15') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR16, 'JUNK16') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR17, 'JUNK17') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR18, 'JUNK18') );
    DBMS_OUTPUT.PUT_LINE('VA1 IN CUR: '||NVL(VAR19, 'JUNK19') );
    END;
    /

    what is the wrong with this plsql block.

    anyone give reply pls.

    Thank you

  2. #2
    Join Date
    Dec 2003
    Location
    Noida, India.
    Posts
    171
    You did not give the error/problem in this sql block.

    A quick browse of this code shows that OV1 is the variable of type DUMMY.REF_CURSOR

    The past parameter in proc call is type DUMMY.REF_CURSOR and not variable OV1
    Oracle can do wonders !

Posting Permissions

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