Question : Dynamic VARRAY in Stored procedures ??

This is how I define a VARRAY in an oracle stored procedure . (

TYPE v_e_arr is VARRAY(10) OF VARCHAR2(80);

Here VARRAY length is defined as 10 .
But is there a way that it can be defined dynamically ?

because i have no idea how big my input array will be.

Answer : Dynamic VARRAY in Stored procedures ??

The VARRAYs by definition have fixed size. If you want flexibile array you should consider using PL/SQL tables instead:
TYPE v_e_arr is TABLE OF VARCHAR2(80) INDEX BY BINARY_INTEGER;
Here's a link to the documentation:
http://download-west.oracle.com/docs/cd/A97630_01/appdev.920/a96624/05_colls.htm#34607
Hope that helps!
Random Solutions  
 
programming4us programming4us