Results 1 to 2 of 2

Thread: Passing A PL/SQL Table Through a Procedure

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Answers
    1

    Passing A PL/SQL Table Through a Procedure

    I have created a pl/sql package comprised of individual procedures that are parameter driven. These procedures are called within a pl/sql anonymous block that serves as a driver, and provides the values for these parameters. Within the declare section of the anonymous block, i have defined a table that is comprised of the rows returned from a cursor, as follows: cursor c_gwl_stglvl0 is ... Type gwl_wkld_tab_typ is table of c_gwl_stglvl0%rowtype index by pls_integer; gwl_wkld_tab gwl_wkld_tab_typ; v_gwl_wkld_cnt pls_integer; v_row_ctr pls_integer; this table is populated at the beiginning of the anonymous block using a bulk fetch. Thoughout the remainder of the driver program, various adjustments will need to be made to the individual rows within this table, prior to the writing of the entire contents of the table (including all the adjustments) to the final database table. I have already successfully developed the code needed to parse and update the individual rows of this table, both individually and in their entirety. This code will be introduced into two of the individual procedures, and i am wondering whether i can pass the table itself as a parameter to those procedures. I beleive it is a matter of scope, and need to understand how to identify the type of the table within the package specification and package body so that the calling procedure will recognize both the structure and the current contents of the table, including any changes that have been made to it through calls to other procedures. Any help will be greatly appreciated, and any questions will be quickly answered.


  2. #2
    Junior Member
    Join Date
    Oct 2006
    Answers
    4

    Re: Passing A PL/SQL Table Through a Procedure

    you can make declare the associated array in the specification of the package and once the arrays are populated don't delete it and you can use in other procedure inside the same packages.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact