Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Passing PL-SQL Tables as arguments
A copy of this was sent to gundugollu_at_yahoo.com (if that email address didn't require changing) On Tue, 31 Mar 1998 09:49:47 -0600, you wrote:
>Hi
>
>I am trying to pass a PL-SQL Table to a procedure. I don't know
>if this is possible.
>
>What I am trying to do as a first step is declare a procedure
>with the argument as a pl-sql table.
>
>create or replace procedure proc_xx(
> table_in IN products_table)
>
>TYPE products_table IS TABLE OF products
>INDEX BY BINARY INTEGER
>
>BEGIN
> ...
put the type in a package spec where anyone can see it. For example:
create package TYPES
as
type products_table is table of products index by binary_integer; end;
create or replace procedure proc_xx( table_in types.products_table )
as
begin
.....
end
You need to put it in a SPEC for others to be able to see it (and hence let them call your routine. They too will need to use the type TYPES.PRODUCTS_TABLE when declaring a variable to pass to you)
>
>
>I am getting error when I compile this saying
>0/0 PL/SQL: Compilation unit analysis terminated
>1/34 PLS-00201: identifier 'PRODUCTS_TABLE' must be declared
>
>Any help/suggestions greatly appreciated
>
>TIA
>
>Anil
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue Mar 31 1998 - 00:00:00 CST
![]() |
![]() |