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: HELP PL/SQL (TABLE DATATYPE)

Re: HELP PL/SQL (TABLE DATATYPE)

From: Daniel Clamage <dclamageNOSPAM_at_telerama.com>
Date: 2 Sep 1998 17:42:17 -0400
Message-ID: <01bdd68f$6aa7c850$ec28c9cd@saturn>


The 7.2 and before way is to assign an empty table to the one to delete entries for.
filled_arr some_tabtype;
empty arr some_tabtype;
...
filled_arr := empty_arr; -- clear all entries Never insert anything into empty_arr.  

The 7.3 way is to use the DELETE member of pl/sql tables. filled_arr.delete;

--
- Dan Clamage
http://www.telerama.com/~dclamage
If you haven't crashed the Server,
you haven't been trying hard enough.

Sylvain <sylb_at_microtec.net> wrote in article <6sk1qh$12q$1_at_news.quebectel.com>...
> Hello,
>
> Here's what i'm trying to do. I use pl/sql table datatype and would like
to
> be able to delete these tables after i'm finish with them.
>
> I'm trying some pl/sql code from the oracle book that doesn't work for me
?
>
> Every time i assign null to my table to delete them i get an error like
> "Expression is wrong type..."
>
> Is there any other way to do this ?
>
>


> --
> Oracle Version :
>
> Oracle7 Server Release 7.1.6.2.0 - Production Release
> PL/SQL Release 2.1.6.2.0 - Production
>
>


> --
> Example from the book :
>
> DECLARE
> TYPE NumTabTyp IS TABLE OF NUMBER
>
> INDEX BY BINARY_INTEGER;
> sal_tab NumTabTyp;
> BEGIN
> /* Load salary table. */
> FOR i IN 1..50 LOOP
> sal_tab(i) := i;
> END LOOP;
> ...
> sal_tab := NULL; -- deletes sal_tab table <---- this line
does'nt
> work for me ???
>
>
>
>
>
Received on Wed Sep 02 1998 - 16:42:17 CDT

Original text of this message

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