Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Location
    MUMBAI
    Posts
    2

    Unanswered: how to use refrence cursor

    can any one help me know how to use reference cursor query in reports 9i

    for that i was trying to create a pakage but i am facing some error can any one help me

    the code is given below.The database tabel name ia MRVS
    PACKAGE consign_dt_proc AS
    type consign_dt is RECORD
    (MRV_NO MRVS.MRV_NO%type ,_
    ENTRY_DT MRVS.ENTRY_DT%type ,_
    CONSIGN_NO MRVS.CONSIGN_NO%type ,
    CONSIGN_DT MRVS.CONSIGN_DT%TYPE ,
    INV_DT MRVS.INV_DT%TYPE ,
    INV_NO MRVS.INV_NO%TYPE ,
    CHALL_DT MRVS.CHALL_DT%TYPE ,
    CHALL_NO MRVS.CHALL_NO%TYPE ,
    PO_NO MRVS.PO_NO%TYPE ,
    AWB_NO MRVS.AWB_NO%TYPE ,
    MRV_RMKS MRVS.MRV_RMKS%TYPE ,
    ED MRVS.ED%TYPE ,
    ED_PERCNT MRVS.ED_PERCNT%TYPE ,
    bkd_frm consigns.bkd_frm ,
    bkd_to consigns.bkd_to ,
    vend_nm vend_bas.vend_nm ,
    FIN_VAL number
    );

    type CONSIGTN_DT_REF_CUR is REF CURSOR return consign_dt;
    function CONSIGN_DT_FUNC(P_CONSIGN_DT DATE) return CONSIGTN_DT_REF_CUR;

    END consign_dt_proc;

  2. #2
    Join Date
    Aug 2003
    Posts
    1

    What is the error

    Hi Arvind,

    What's the error? I see not much of a problem with ur code except that you miss a create / create or replace command in the begining of the code. If you post the error then it would be much helpful in debugging ur problem.

    Also, ref cursor don't have any special meaning in 9i, they hold the same functionality as they did in 8i for that matter. Basically you need to see that incase you need a ref cursor or not at the first place while writing a query.

    Suppose for example : You have a consignee cursor in a function/procedure that you want to pass to another function/procedure then instead of coding the cursor in the called fun/proc you can send it as a parameter by the help of ref cursor.

    Rgds'
    Shobhit

Posting Permissions

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