DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: PL/SQL RECORD...

  1. #1
    Join Date
    Apr 2001
    Posts
    19
    Hi!
    I have a doubt, Let me know whether doing the below mentioned method is fine. Because I am unable to assign values. Please give your suggestions.

    Thanks!

    Package Invoice_Det_Type Is
    Type t_invoice_rec Is Record (
    t_inv_invno invoices_details.inv_invno%TYPE,
    t_pol_pid invoices_details.pol_pid%TYPE,
    t_pol_hist invoices_details.pol_hist%TYPE,
    t_pol_price invoices_details.pol_price%TYPE,
    t_pol_tax invoices_details.pol_tax%TYPE,
    t_pol_status invoices_details.pol_status%TYPE);

    Type t_invoice_tab Is Table Of t_invoice_rec;
    End;

    Declare
    t_invoice_det invoice_det_type.t_invoice_tab;
    Begin
    t_invoice_det(l_count).t_inv_invno := l_inv_invno;
    t_invoice_det(l_count).t_pol_pid := l_pol_cur.pol_pid;
    t_invoice_det(l_count).t_pol_hist := l_pol_cur.pol_hist;
    t_invoice_det(l_count).t_pol_price := l_pol_cur.pol_price;
    t_invoice_det(l_count).t_pol_tax := l_pol_cur.pol_tax;
    t_invoice_det(l_count).t_pol_status := l_pol_cur.pol_status;

    End;

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    Package Invoice_Det_Type Is
    Type t_invoice_rec Is Record (
    t_inv_invno invoices_details.inv_invno%TYPE,
    t_pol_pid invoices_details.pol_pid%TYPE,
    t_pol_hist invoices_details.pol_hist%TYPE,
    t_pol_price invoices_details.pol_price%TYPE,
    t_pol_tax invoices_details.pol_tax%TYPE,
    t_pol_status invoices_details.pol_status%TYPE);

    Type t_invoice_tab Is Table Of t_invoice_rec INDEX BY BINARY_INTEGER;
    End;
    /

    Declare
    t_invoice_det invoice_det_type.t_invoice_tab;
    l_count PLS_INTEGER = 1;
    Begin
    t_invoice_det(l_count).t_inv_invno := l_inv_invno;
    t_invoice_det(l_count).t_pol_pid := l_pol_cur.pol_pid;
    t_invoice_det(l_count).t_pol_hist := l_pol_cur.pol_hist;
    t_invoice_det(l_count).t_pol_price := l_pol_cur.pol_price;
    t_invoice_det(l_count).t_pol_tax := l_pol_cur.pol_tax;
    t_invoice_det(l_count).t_pol_status := l_pol_cur.pol_status;

    -- l_count := l_count +xxxx;

    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
  •  


Click Here to Expand Forum to Full Width