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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Initialize Varrays

RE: Initialize Varrays

From: Payne, Forrest <Forrest.Payne_at_Cinergy.COM>
Date: Thu, 18 Oct 2001 04:36:51 -0700
Message-ID: <F001.003AE6E1.20011018041520@fatcity.com>

<SPAN
class=225201411-18102001>gt(gtcount):='';  should work as well as gt(gtcount):=NULL;
as
long as gtcount is valid.

  <FONT face=Tahoma
  size=2>-----Original Message-----From: Gavin D'mello   [mailto:gavin_d_at_tis.co.in]Sent: Thursday, October 18, 2001 7:00   AMTo: Multiple recipients of list ORACLE-LSubject:   Initialize Varrays
  Hi,
        I am working on

  Varrays in PL/SQL and till date the documentation provides a detailed   description on how to create and initialize Varrays. However, it does not   state the fact that when the Varray is extended, the new element is null and   so any attempt to insert values into it, results in a 'Subscript beyond count'   error. This basically boils down to the new element not being initialized.   this is the point where I am stuck.
 
 

  CREATE TYPE taxonomy AS VARRAY(5) OF
  VARCHAR2(40);
 

  gt taxonomy := taxonomy('temp');
 

  gt.extend(1);
 

  gt(gtcount) := ' '; -- results in an error.
 

  Can Anyone tell me how do i initialize the new element of   the varray ?
 

  Thanks,
 

  Gavin
 
Received on Thu Oct 18 2001 - 06:36:51 CDT

Original text of this message

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