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: One more PL/SQL question

Re: One more PL/SQL question

From: <seci_at_ludens.elte.hu>
Date: 16 Jun 98 14:01:55 +0100
Message-ID: <1998Jun16.140155.51220@ludens>


hello,
In article <01bd9918$893bbba0$528480c3_at_www>, "Danil Krasnov" <danil_at_maginfo.net> writes:
> Hello, all!
>
> Fragment of PL/SQL code:
>
> -----------------------------------------------------------
>
> create or replace package types as
> TYPE OrdersTabTyp IS TABLE OF i_orders%ROWTYPE INDEX BY BINARY_INTEGER;
> empty_table OrdersTabTyp;
> end;
> /
>
> create or replace package pack1 is
> procedure proc1( ord_tab IN types.OrdersTabTyp default

=============================^^^^ this is an IN parameter

> types.empty_table);
> end;
> /
>
> create or replace package body pack1 is
> procedure proc1(ord_tab IN types.OrdersTabTyp default types.empty_table) is
> begin
> ord_tab(1).o_qty := 2; -- o_qty field has type number

so you cannot modify it (it is not C). declare as IN OUT or make a copy of this variable

> end;
> end;
> /
> -----------------------------------------------------------
>
> After executing this script in SQLplus, I get an error:
> PLS-00363: expression "ord_tab" cannot be used as an assignment target.
>
> Where is a mistake?
>
> Thanks.
>
> Danil Krasnov
> danil_at_maginfo.net
>
>
>

HTH
        peter Received on Tue Jun 16 1998 - 08:01:55 CDT

Original text of this message

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