Re: Passing PL/SQL Table into Stored Proc from SQLPlus
Date: 1996/07/10
Message-ID: <31E379F3.33D2_at_acslink.aone.net.au>#1/1
Gary Friedrichsen wrote:
>
> I have created a Stored Procedure which has 3 scalar input
> parameters, and two PL/SQL Table input parameters. I have been
> unsuccessfull executing this from SQLPlus because I cannot
> find how to pass in the table parameters.
>
> Any help???
You need to do something like this
declare
a_tbl a_package.a_type;
begin
a_tbl(1) := 1;
a_tbl(2) := 2;
a_package.a_procedure(a_tbl);
end;
I hope my syntax is correct; the gist of it is that firstly you need to use an 'anonymous PL/SQL block' within SQL*Plus (ie. start with declare, I think), and secondly it is not good enough to use a type that 'looks the same' - you have to use the type declared in the package you are calling as shown by the a_package.a_type above.
Hope this helps,
Russell
Received on Wed Jul 10 1996 - 00:00:00 CEST