View of variables declared within a package/procedure

Does anyone know of a view which holds all the variables declared within a package/function/procedure?
I can see that _arguments holds the parameters defined.
PLSQL Developer displays these things in their drop downs, so I assume they are either getting it from a view or have written something which parses the _source view?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Do you mean this ?
SCOTT@db102 SQL> desc dbms_output
PROCEDURE DISABLE
PROCEDURE ENABLE
Argument Name                  Type                    In/Out Default?
BUFFER_SIZE                    NUMBER(38)              IN     DEFAULT
PROCEDURE GET_LINE
Argument Name                  Type                    In/Out Default?
LINE                           VARCHAR2                OUT
STATUS                         NUMBER(38)              OUT
PROCEDURE GET_LINES
Argument Name                  Type                    In/Out Default?
LINES                          TABLE OF VARCHAR2(32767) OUT
NUMLINES                       NUMBER(38)              IN/OUT
PROCEDURE GET_LINES
Argument Name                  Type                    In/Out Default?
LINES                          DBMSOUTPUT_LINESARRAY   OUT
NUMLINES                       NUMBER(38)              IN/OUT
PROCEDURE NEW_LINE
PROCEDURE PUT
Argument Name                  Type                    In/Out Default?
A                              VARCHAR2                IN
PROCEDURE PUT_LINE
Argument Name                  Type                    In/Out Default?
A                              VARCHAR2                IN
SCOTT@db102 SQL>                                         

Similar Messages

  • How to make a dynamic function call from within a package procedure

    Hi:
    I need to call a function dynamically (name and parameters determined at run time, but return value is known:always an integer). I can build the call and place it in a dynamic sql using dbms_sql. But the function is inside a package and is not public.
    So, if I issue:
    dbms_sql.parse( cur,'SELECT '||call||' FROM dual', dbms_sql.v7 )
    where call is "DOS(234,'V')"
    I get:
    ORA-00904: "DOS": invalid identifier
    If I make the function ("DOS") public and "call" equals "pack.DOS(234,'V')", it works fine, but I don't want to make it public.
    Is there a solution?
    Thanks in advance
    RuBeck

    Hi, Kamal:
    Calling from outside of the owner package is not possible if it is not public.The calls are from inside the package. It looks like the dynamic select is executed "outside" the package, so the private function is unknown
    Make it available in the package headerLooks like it's the only solution
    How often this will be executed?This is a library for loading files into tables and executing dynamic validation procedures.
    Here's an example of the mechanics:
    create or replace package mypack as
         function one return number ; -- public function
         procedure execute_it( p_name VARCHAR2 ) ;
    end ;
    create or replace package body mypack as
    function one return number is
    begin
    return 1 ;
    end ;
    function two( i number, s varchar2 ) return number is -- private function
    begin
    return 2 ;
    end ;
    procedure execute_it( p_name VARCHAR2 ) is
    select_str VARCHAR2( 1000 ) ;
    v_num NUMBER ;
    cur NUMBER ;
    nf NUMBER ;
    begin
    select_str := 'SELECT '||p_name||' FROM dual' ;
    cur := dbms_sql.open_cursor ;
    dbms_sql.parse( cur,select_str,dbms_sql.v7 ) ;
    dbms_sql.define_column( cur,1, v_num ) ;
    nf := dbms_sql.execute( cur ) ;
    IF dbms_sql.fetch_rows( cur ) = 0 THEN
    RAISE no_data_found ;
    END IF ;
    dbms_sql.column_value( cur, 1, v_numero ) ;
    dbms_output.put_line( p_name||' returns '||v_num ) ;
    dbms_sql.close_cursor( cur ) ;
    end ;
    end ;
    begin
    mypack.execute_it( 'mypack.one' ) ; -- Call public function: Works fine
    mypack.execute_it( 'two(234,''v'')' ) ; -- Call private function: error 0904
    end ;
    Thanks for your hints
    RuBeck
    PS: The indentation is lost when I post the message! I wrote it indented!

  • Creating a table/view or temporary table from within a stored procedure

    Hi Gurus,
    Can someone tell me if it is possible to create a table (or view) from within a stored procedure.
    PROBLEM:
    In fact I need to create a report at back end (without using oracle developer forms or reports). This report requires creating several tables to hold temporary report data. If I create a sql*plus script for this, i works fine, because it can run DDL and other sql or pl/sql statements sequencialy. But this sql*plus script cannot be called from application. So, application needs an stored procedure to do this task and then application call that procedure. But within stored procedure, i am unable to create table (or run any ddl statement). Can somebody help me in this?
    Thanks in Advance.

    Denis,
    The problem with Nicholas' suggestion isrelated to the fact that now you have two components
    (a table and a stored procedure)
    I don't see any problem to have "two
    components" here. After all, what about all others
    tabes ? This is only one more, but I don't understand
    why want manage less objects, that implies more code,
    more maintenance, and more difficulties to debug.
    Needless to say about performance...
    Nicolas.The same reasons apply if you were forced to declare all PL/SQL variables publicly (outside the stored proc.) rather than privately (from inside the stored proc). Naming conflicts for one. If the name that you want to use for the GTT already exists, you need to find a new name. With the SQL Server type local/private declarations, you wouldn't have that problem.
    I can see how performance would be the same or better using GTTs. If the number of records involved is low, this is likely negligable.

  • How do I view a FUNCTION within a Package Body

    I can see the FUNCTION being executed within the Package...
    FUNCTION Stop_Refresh_AsBilled
    RETURN Number;
    And within Oracle SQL Developer and using the Connection and "Packages" part of the Schema, I see the Function Name. However, when I <Double-Click> on the FUNCTION Name within the Schema, it is taking me to where the FUNCTION is executed within the Package and NOT to the PL/SQL Code that actually makes up the FUNCTION.
    Am I missing something here??? Maybe in my Preferences??? How can I drill down further to actually find the FUNCTION Definition and PL/SQL Code that makes up the FUNCTION within the Package Body???
    I can bring up the Package Body and Search on the FUNCTION that way. I'm hoping there is an easier way however to drill down to the actual PL/SQL Code that makes up the FUNCTION.
    I hope I am being clear in my explanation here.
    Thanks for your review and I am hopeful for a reply.
    PSULionRP

    Jim, opening the body node to see all functions and procedures sometimes does not work in 3.0
    I have many packages generated by Feuerstien's CodeGen utility. The Query package appears just fine with every function and procedure appearing as expected in both header and body nodes. However, the Change Package fails miserably. Header shows all functions and procedures fine, but the body node only shows the top private declarations of variables and types. Not one function or procedure appears in the expanded node.
    The only thing I can figure is that the Change package of about 30 named items has many of the same name+ with overloaded parameters. I think SQL Dev is having problems parsing the names in the body even though it does fine with the names in the header of the package--perhaps because of many private variables and PRAGMA's declared at the top of the body.
    Both packages have about 30 functions, but the Change package body has over 2000 lines while the Query package has fewer than 500.
    Just adding to the mystery--but I think it merits a bug report (gotta figure out where to report it now).

  • Calling a stored procedure within a package

    We have a number of packages containing stored procedures. In an existing production application, we used embedded SQL in C programs to call these stored procs
    e.g.
    EXEC SQL EXECUTE
    BEGIN owner.fees_calc.some_fee(:parm1,...);
    END;
    END-EXEC;
    Now, I am trying to use SQLJ to call this same stored proc in the package. However, I am getting a compilation error from sqlj saying that it cannot find a stored procedure or function of that name. It works fine if I use a stored proc that is not in a package.
    So how do I call a stored procedure within a package? Or is this not currently possible with sqlj?
    I am also getting a warning just before the error and I'm wondering if the error is being caused by this:
    Warning: You are using an Oracle JDBC driver, but connecting to a non-Oracle database. SQLJ will perform JDBC-generic SQL checking.
    I am connecting to an Oracle 7.3.3 database using an Oracle 7.3.4 JDBC driver. I also tried using the Oracle 8.0.5 JDBC driver for the same database but I get the same warning message.

    I used the following code to call a stored
    procedure via SQLJ:
    try {
    #sql [iCtx] {
    CALL ibs.cvs_validate.validate_port_id(:IN record_id ,:IN poe_pod_flag,:IN port_id,:OUT error_code,:OUT error_message) };
    where
    "ibs" is the schema
    "cvs_validate" is the package
    "validate_port_id" is the procedure
    The code runs fine, but to get it to compile
    in JDeveloper 2.0, I had to disable the "Check SQL semantics against database schema" option on the Project Properties (SQLJ) property sheet.
    null

  • Package Procedure cursor declaration

    Hi am facing this issues , I am too close the problem to figure. Pl help
    procedure addRox(p_reg_type_id in  number, p_offender_id in  number,p_sentence_end_date in  date,
                                p_registration_date in  date,p_end_registration_date in  date,
                                p_aggravated in  varchar2,p_habitual in  varchar2, p_comments  in varchar2, p_status  in varchar2 DEFAULT null  , p_OFFENSE_CODE in number) is
      cursor tierNum is
        select max(c.tier) from sor_offense o, sor_offense_code c
        where o.offender_id = p_offender_id
        and o.offense_code = c.CODE_ID
        and o.state = 30658
        and upper(o.status) = 'ACTIVE';
      tier number;
      vEndRegDate registration_offender_xref.END_REGISTRATION_DATE%type default null;
    begin
         open tierNum;
         Fetch tierNum into tier;
          if tierNum%NotFound then
            tier := Null;
          end if;
        Close tierNum;
        if tier is not null then
          if(p_sentence_end_date is null) then -- sentenceEndDate is null
              if tier = 1 then
              vEndRegDate := add_months(p_registration_date - 1,180);
              end if;
            if tier = 2 then
              vEndRegDate := add_months(p_registration_date - 1,300);
            end if;
            if tier = 3 then
                vEndRegDate := Null;
            end if;
          else -- sentence_end_date is not null
            if tier = 1 then
              vEndRegDate := add_months(p_sentence_end_date - 1,180);
            end if;
            if tier = 2 then
              vEndRegDate := add_months(p_sentence_end_date - 1,300);
            end if;
            if tier = 3 then
              vEndRegDate := Null;
            end if;
          end if;
        end if;
              insert into registration_offender_xref (reg_type_id, offender_id, status,sentence_end_date,
                                registration_date,end_registration_date,aggravated,habitual,status_date, comments)
                         values (p_reg_type_id, p_offender_id, 'Active',p_sentence_end_date,
                                p_registration_date,vEndRegDate,p_aggravated,p_habitual,sysdate, p_comments);
            -- commit;
    exception
      when others then
            DBMS_OUTPUT.PUT_LINE('ERR in  '||sqlerrm);
    end addRox;\
    error:Error(4,12): PLS-00323: subprogram or cursor 'ADD_ABC' is declared in a package specification and must be defined in the package body

    >
    Hi am facing this issues , I am too close the problem to figure. Pl help
    error:Error(4,12): PLS-00323: subprogram or cursor 'ADD_ABC' is declared in a package specification and must be defined in the package body
    >
    You aren't getting that exception from the code you posted. There is nothing with 'ABC' in any of that code.
    If you want help you need to post the code that you need help with.

  • Variable declaration in Package and package body

    Hi
    Kindly reply the difference in declaring a cursor inside a package vs package body
    eg:
    create or replace package shapak is
    cursor shacur is select * from sha;
    function shafun return number;
    end;
    i can declare the above cursor inside the package body withoout declaring in package specification. but what is the difference?
    reply appreciated
    thanks
    shajan

    In general..Items declared in the package spec are visible outside the package..so you can say public.where as items declared in the body are restricted to use within the package..such items are called private.

  • How to use local variables declared in b/t the methods in other views

    Hi
    i need to use the value of the local variables declared in b/w the views in one other view,as i have manipulated the value based on some condition & want to use it in 1 more view for my req.,but that variable is not global one just for once i need to use it,and i can't again write the whole for its conditions,as its there in initialization view,which if coded again,can hit the functionality there,so is it possible to use the value of such local variables thereafter or not,if yes pls let me know,or i need to declare the global variable for this.

    hi,
    1.Declare an Attribute in Component controller.
    2. Pass the value to this Attribute in View V1.
             using :
      wd_comp_controller->Att = 'Saurav'.
    3. Now in view2 , you can access this Attribute using:
      data lv type string.
         lv = wd_comp_controller->Att .
    Here Att is my attribute of type string declared in component controller.

  • Ability to filter out Views, Indexes, Packages, Procedures, Functions, etc.

    Under Connections, I choose my database, then the user, and from there I view my Tables. I have no need to view Views, Indexes, Packages, Procedures, etc., just the tables (which I am able to filter).
    Since the tree containing Views, Indexes, Packages, etc., take up a lot of real estate (I work with multiple databases, each with a specific user, or schema), is it not possible to filter these out?
    Thanks!
    Edited by: user9956988 on Jun 15, 2010 3:53 PM

    Just to double check that I'm interpreting the problem correctly, is the following true:
    select * from all_objects where object_name = 'DBA_SOURCE'
    returns nothing
    select * from dba_source where name = your PL/SQL module
    returns all the code

  • Need Help: Using Ref Cursor in ProC to call a function within a Package

    I'm calling a function within a package that is returning a REF CURSOR.
    As per the Oracle Pro*C Programmer's Guide, I did the following:
    1) declared my cursor with a: EXEC SQL BEGIN DECLARE SECTION and declared the cursor as: SQL_CURSOR my_cursor;
    2) I allocated the cursor as: EXEC SQL ALLOCATE :my_cursor;
    3) Via a EXEC SQL.....END-EXEC begin block
    I called the package function and assign the return value to my cursor
    e.g. my_cursor := package.function(:host1, :host2);
    Now, the only difference between my code and the example given in the Pro*C Programmer's Guide is that the example calls a PROCEDURE within a package that passes back the REF CURSOR as an OUT host variable.
    Whereas, since I am calling a function, the function ASSIGNS the return REF CURSOR in the return value.
    If I say my_cursor := package.function(:host1, :host2); I get a message stating, "PLS-00201: identifier MY_CURSOR" must be declared"
    If I say :my_cursor := package.function(:host1, :host2); I get a message stating, "ORA-01480: trailing null missing from STR bind value"
    I just want to call a package function and assign the return value to a REF CURSOR variable. There must be a way of doing this. I can do this easily in standard PL/SQL. How can this be done in Pro*C ???
    Thanks for any help.

    Folks, I figured it out. For those who may face this problem in the future you may want to take note for future reference.
    Oracle does not allow you to assign the return value of a REF CURSOR from a FUNCTION ( not Procedure - - there is a difference) directly to a host variable. This is the case even if that host variable is declared a CURSOR variable.
    The trick is as follows: Declare the REF CURSOR within the PL/SQL BEGIN Block, using the TYPE statement, that will contain the call to the package function. On the call, you then assign the return REF CURSOR value that the function is returning to your REF CURSOR variable declared in the DECLARE section of the EXEC SQL .... END-EXEC PL/SQL Block.
    THEN, assign the REF CURSOR variable that was populated from the function call to your HOST cursor varaible. Then fetch this HOST Cursor variable into your Host record structure variable. Then you can deference individual fields as need be within your C or C++ code.
    I hope this will help someone facing a deadline crunch. Happy computing !

  • Temporary table within a package

    I'm not sure this is the best way to achieve it, but I'm trying to use a temporary table within my package, but I failed!
    In my package, my procedure do receive 5 different phone numbers (vTel1 to vTel5) and I need to order them, using data from a table. Also, if 2 of them are the same, I need only the one with the highest rank.
    Let say my TelOrder table look likes:
    Reason
    Tel1
    Tel2
    Tel3
    Tel4
    Tel5
    Reason1
    2
    3
    1
    5
    4
    Reason2
    1
    2
    null
    3
    4
    And I receive those variable
    vTel1='5141111111'
    vTel2=null
    vTel3='5143333333'
    vTel4='5141111111'
    vTel5='5145555555'
    vReason='Reason1'
    Using the Reason1, I need to be able to get the result looking like:
    RowNum
    Phone
    Order
    1
    5143333333
    1
    2
    5141111111
    2
    3
    5145555555
    4
    And I need this code to be apart from the procedure, cause many procedures will use the same code, and I don't want to abuse the ctrl+c, ctrl+v at each update.
    I've come close by using something like:
    EXECUTE IMMEDIATE '
         INSERT INTO Table
         SELECT Rownum as RN, Ordre, contact_info, Contact_info_type
         FROM
           (SELECT a.contact_info, a.ordre, contact_info_type FROM
             (SELECT contact_info,min(ordre) as Ordre FROM
               (SELECT Tel1 as Ordre, ''' || vTel1 || ''' as contact_info, 1 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
               UNION ALL
               SELECT Tel2 as Ordre, ''' || vTel2 || ''' as contact_info, 2 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
               UNION ALL
               SELECT Tel3 as Ordre, ''' || vTel3 || ''' as contact_info, 4 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
               UNION ALL
               SELECT Tel4 as Ordre, ''' || vTel4 || ''' as contact_info, 4 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
               UNION ALL
               SELECT Tel5 as Ordre, ''' || vTel5 || ''' as contact_info, 1 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
             WHERE Ordre is not null and contact_info is not null
             GROUP BY contact_info
             ) a
           JOIN
             (SELECT Tel1 as Ordre, ''' || vTel1 || ''' as contact_info, 1 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
             UNION ALL
             SELECT Tel2 as Ordre, ''' || vTel2 || ''' as contact_info, 2 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
             UNION ALL
             SELECT Tel3 as Ordre, ''' || vTel3 || ''' as contact_info, 4 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
             UNION ALL
             SELECT Tel4 as Ordre, ''' || vTel4 || ''' as contact_info, 4 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
             UNION ALL
             SELECT Tel5 as Ordre, ''' || vTel5 || ''' as contact_info, 1 as contact_info_type FROM TelOrder WHERE Reason=''' || vReason || '''
             ) b ON a.contact_info=b.contact_info AND a.ordre=b.ordre
           ORDER BY a.Ordre
    But when I try to remove this code and send it into another procedure/function, I can't make it work.
    PLEASE HELP!!!!  

    No Database to try it. Check at your own risk if this might work for you
    no version specified from your side, NOT TESTED from my side, so let's say we're even
    select row_number() over (order by the_order) "RowNum",
           the_val "Phone",
           the_order "Order"
      from (select v.the_val,t.the_order,
                   row_number() over (partition by v.the_val order by t.the_order) rn
              from (select reason,the_order,the_phone
                      from (select reason,tel1,tel2,tel3,tel4,tel5
                              from telorder
                             where reason = :the_reason
                    unpivot include nulls (the_order for the_phone in (tel1 as 'tel1',
                                                                       tel2 as 'tel2',
                                                                       tel3 as 'tel3',
                                                                       tel4 as 'tel4',
                                                                       tel5 as 'tel5'
                   ) t,
                   (select 'tel1' the_var,:v_tel1 the_val from dual union all
                    select 'tel2' the_var,:v_tel2 the_val from dual union all
                    select 'tel3' the_var,:v_tel3 the_val from dual union all
                    select 'tel4' the_var,:v_tel4 the_val from dual union all
                    select 'tel5' the_var,:v_tel5 the_val from dual
                   ) v
             where t.reason = :v_reason
               and t.the_phone = v.the_var
    where rn = 1
       and the_val is not null
    Regards
    Etbin

  • Calling a package.procedure that accepts a type table.

    I'm getting the error "Error(45,20): PLS-00330: invalid use of type name or subtype name" when I run the procedure SP when it calls the d.is_date procedure that accepts a table as the second parameter.
    below is the Abbreviated code for the package.procedures that contain the "is_date".
    I've tried several things and can't seem to get SP to compile.
    thanks.
    create or replace
    PROCEDURE SP AS
    valid_out boolean;
    date_out date;
    date_fmt_out varchar2(30);
    type Mask_Tabtype is
    table of varchar2( 30 )
    index by binary_integer;
    Fmts Mask_Tabtype;
    BEGIN
    Fmts( 1 ) := 'fxDD-MON-RR';
    Fmts( 2 ) := 'fxDD-MON-YYYY';
    Fmts( 3 ) := 'fxDD-MON';
    Fmts( 4 ) := 'fxMM/DD';
    Fmts( 5 ) := 'fxMM/RRRR';
    d.Is_Date( 'test', Mask_Tabtype, Valid_out, Date_out, Date_Fmt_out);
    END SP;
    create or replace package d as
    type Mask_Tabtype is
    table of varchar2( 30 )
    index by binary_integer;
    Fmts Mask_Tabtype;
    Procedure Is_Date( Value_in in varchar2,
    Tab in Mask_Tabtype,
    Valid_out out boolean,
    Date_out out date,
    Date_Fmt_out out varchar2);
    end d;
    create or replace package body d as
    Fmt_Count integer;
    Date_Val date := null;
    Date_Fmt varchar2( 30 ) := 'fxMM/DD/YYYY';
    Procedure Is_Date(value_in in varchar2, Tab In Mask_Tabtype,
    Valid_out out boolean, Date_out out date, Date_Fmt_Out out varchar2)
    is
    begin
    /* Logic here removed to make post smaller
    End Is_date;
    End d;

    Here...
    d.Is_Date( 'test', Mask_Tabtype, Valid_out, Date_out, Date_Fmt_out);you are passing in Mast_Tabtype, which is a type declaration, rather than a variable of that type.
    Try...
    d.Is_Date( 'test', Fmts, Valid_out, Date_out, Date_Fmt_out);

  • How can i view the variables of the session memory

    Hi experts
       How can i view the variables of the session memory.Such as I want display the variables of memory which id is 'BULRN' in ABAP debug.
    In program i can use import from memory id visit the momery of session,but i don't know the name of variables which store in momery of my session.

    Its not possible to view in the debug mode..
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    SAP global memory retains field value through out session.
    set parameter id 'MAT' field v_matnr.
    get parameter id 'MAT' field v_matnr.
    They are stored in table TPARA.
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    ABAP memory is temporary and values are retained in same LUW.
    export itab to memory id 'TEST'.
    import itab from memory Id 'TEST'.
    Here itab should be declared of same type and length.

  • Package/procedure/function calls done with in a package

    Hi Experts,
    Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
    It would be great if we can provide a tree like structure of the objects being called/used.
    btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
    Appreciate your time..
    Thanks
    Manju

    manjukn wrote:
    Hi Experts,
    Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
    It would be great if we can provide a tree like structure of the objects being called/used.
    btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
    Appreciate your time..What database version do you have?
    11g I think provides some sort of fine grained dependency information which can detail packages, but prior to 11g you can only get dependencies on the database objects themselves of which functions/procedures within a package are not, as the package itself is the object.
    I don't think there's any easy way to find out from any tables or views and I think third party tools would have to parse the code to determine such things themselves, so that may be one of your only options.

  • How to use of variable sized parameter in plsql procedures

    Hello,
    We will write a procedure which has a fixed parameter and which has other variable count parameters. How can we implement with this in pl - sql., which structure(varray, nested table, collections vb) should we use?
    For example:
    I want to use it like below:
    create procedure TestProc
    paramId Number,
    paramOthers
    IS
    -- variable declarations
    vOthers
    begin
    select paramOthers
    into vOthers from table1;
    -- some other sqls
    dbms_output.putline( vOthers[0] || ' some message ' || vOthers[1] || ' some other message' || vOthers[3] || ' anoother message... ' || vOthers[n] );
    end TestProc;
    /

    I also tried but I am taking errors:
    My simple code is:
    ( I have not to try to use values in array as column names in select statement yet )
    /* Formatted on 2008/09/26 10:35 (Formatter Plus v4.8.8) */
    CREATE OR REPLACE PACKAGE TEST_PACKAGE
    AS
    TYPE VARCHAR2_ARR IS TABLE OF VARCHAR2 (50);
    FUNCTION TEST_FUNC (S IN NUMBER, MY_PARAM_ARR IN VARCHAR2_ARR)
    RETURN VARCHAR2;
    END TEST_PACKAGE;
    CREATE OR REPLACE PACKAGE BODY TEST_PACKAGE
    IS
    FUNCTION TEST_FUNC (S IN NUMBER, MY_PARAM_ARR IN VARCHAR2_ARR)
    RETURN VARCHAR2
    IS
    V_COUNT NUMBER;
    VSTRING VARCHAR2 (10000);
    BEGIN
    VSTRING := '';
    V_COUNT := MY_PARAM_ARR.COUNT;
    FOR TEMP_VAR IN 1 .. V_COUNT
    LOOP
    VSTRING := VSTRING || MY_PARAM_ARR (TEMP_VAR);
    END LOOP;
    RETURN VSTRING;
    END TEST_FUNC;
    END TEST_PACKAGE;
    DECLARE
    MY_ARR TEST_PACKAGE.VARCHAR2_ARR;
    RETVAL VARCHAR2 (20000);
    BEGIN
    MY_ARR (1) := 'Test1';
    MY_ARR (2) := 'Test2';
    MY_ARR (3) := 'Test3';
    MY_ARR (4) := 'Test4';
    SELECT TEST_PACKAGE.TEST_FUNC (3, MY_ARR)
    INTO RETVAL
    FROM DUAL;
    DBMS_OUTPUT.PUT_LINE (RETVAL);
    END;
    I take the error message below:
    ORA-06550: line 10, column 38:
    PLS-00642: local collection types not allowed in SQL statements
    ORA-06550: line 10, column 24:
    PLS-00306: wrong number or types of arguments in call to 'TEST_FUNC'
    ORA-06550: line 10, column 11:
    PL/SQL: ORA-00904: "TEST_PACKAGE"."TEST_FUNC": invalid identifier
    ORA-06550: line 10, column 4:
    PL/SQL: SQL Statement ignored

Maybe you are looking for

  • Unable to send or receive mail on macbook pro

    Unable to send or receive mail on my macbook pro

  • Billing date of the invoice

    Hi, I would like to ask where does the billing date of the invoice (billing type F2) is copied. Is it copied on the actual goods issue date? If that is the case, how about the billing date of an intercompany invoice ( billing type IV), from where doe

  • Hardware capability for FIM Reporting

    I am doing some capacity planning for a FIM 2010 R2 deployment and trying to understand the hardware requirements for the Reporting feature. Based on the diagarm below, it looks like the performance is primarily driven by two factors: System Center a

  • Tree does not show node correctly but node are inserted well ?

    hi, i am haveing tree with 1. Root node (grand parent (only one)) 2.Parent nodes(many nodes) 3.child nodes(many nodes) i add child node in a particular parent node . this is done dynamically when socket thread found any any user .when socket listener

  • How data in table bbp_pdacc gets updated?

    Hello, The Shopping cart is getting created successfully but data is not getting updated in bbp_pdacc and due to which data is not available in bbp_pd. Thanks and Regards Himani Singh