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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL: defining default value for table type

Re: PL/SQL: defining default value for table type

From: Matthias Wirtz <Matthias.Wirtz_at_gmx.net>
Date: Sun, 17 Jul 2005 07:23:48 -0400
Message-ID: <6drCe.56269$iU.22205@lakeread05>


"IANAL_VISTA" <IANAL_Vista_at_hotmail.com> wrote in news:Xns9695B70D15C85SunnySD_at_68.6.19.6...

> > supposingly I have the following package which defines one type:
> >
> > CREATE OR REPLACE PACKAGE p1 IS
> > TYPE t_array IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
> > END;
> >
> > If I then create another package which should use this table type in a
> > procedure called 'result' I'm temted to write:
> >
> > CREATE OR REPLACE PACKAGE p2 IS
> > PROCEDURE result(array p1.t_array DEFAULT p1.t_array);
> > END;
> >
> > But his gives me the error:
> >
> > 2/3 PL/SQL: Declaration ignored
> > 2/48 PLS-00330: invalid use of type name or subtype name

> I'm not clear on why you think you can or should use "DEFAULT" as you want
> to do.

I want to be able to ommit the parameter when calling the procedure 'p2.result'. Be specifying a DEFAULT value for the parameter of the procedure it is not neccessary to pass a value while calling.

I didn't state this in my first posting but I should have to make thinks more clearly.

--
Matthias Wirtz  -  Norfolk, USA
Received on Sun Jul 17 2005 - 06:23:48 CDT

Original text of this message

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