Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can I pass the PL/SQL table as an argument

Re: Can I pass the PL/SQL table as an argument

From: <chandus_at_its.soft.net>
Date: 1998/03/27
Message-ID: <6ffpvi$7o$1@nnrp2.dejanews.com>#1/1

Passing a PL/SQL table to a procedure as an argument is not so straight forward.

The procedure should be in a package.
The package can have a var in the definition as
create or replace package <pkg1> as
Type <table_var> is table of <var_type> index by binary_integer; ...
end <pkg1>

Use this variable definition inside a procedure like this

procedure P1 ( <arg1> IN/OUT <table_var>, ...) is

end <prcd>

To pass <table_var> from another procedure, you should typecast the argument as variable of the previous package Like this...

create or replace procedure P2 (<arg2> IN/OUT <pkg1>.<table_var>%TYPE,

                                .....

) as

end P2;

Any declaration should always reference the package table variable like <pkg1>.<table_var>%TYPE

Hope this solves your problem.

In article <6fdl08$bq2$4_at_news01.btx.dtag.de>,   GreMa_at_t-online.de wrote:
>
> On Wed, 25 Mar 1998 22:51:24 -0600, sambavan_at_mail.utexas.edu wrote:
>
> Hi,
>
> take a look at Oracle's Objects for OLE, especially the database-object and
 it ParameterArrays.
>
> >Hi
> >
> >Is it possible to pass the PL/SQL table as an argument to a procedure?
> >If so what should be the argument type and how should I pass?
> >
> >-----== Posted via Deja News, The Leader in Internet Discussion ==-----
> >http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
> --
>
> Regards
>
> Matthias Gresz :-)
>
> GreMa_at_T-online.de
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri Mar 27 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US