Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Declaring a global table in PL/SQL
On 2005-08-04, absinth <absinth_at_gmail.com> wrote:
> Why can't I have?
>
> CREATE OR REPLACE PACKAGE BODY test AS
> TYPE test_table IS TABLE OF VARCHAR2(30)
> INDEX BY VARCHAR2(2);
>
> DEMO_TABLE test_table;
> DEMO_TABLE('NO') := 'No';
>
> END test;
> /
Do you have a package specification?
The following works, at least on 10g:
create or replace package test as
type test_table is table of varchar2(30)
index by varchar2(2);
demo_table test_table;
end test;
/
create or replace package body test as
begin
demo_table('NO') := 'NO';
end test;
/
hth
Rene
-- Rene Nyffenegger http://www.adp-gmbh.ch/Received on Thu Aug 04 2005 - 01:15:16 CDT