PL/SQL (MOSC)

MOSC Banner

setup and initialize a table type with more than 1 attribute

edited May 9, 2009 10:04PM in PL/SQL (MOSC) 4 commentsAnswered
 
Hi,

I'm faced with a situation where I need to use some static data in a PL/Sql pgm

eg.
code  |  value
------+-------
AAAA  |  EB41
CS09  |  EB45
0000  |  ZZ99
...
...
Like this there are about nearly a 100 recs.

I'm not allowed to load them into a database table and reference them, so I will need to initialise a collection type via pl/sql.

I tried something like this -

   cursor c1 is select 'aaaa' as code, 'bbbb' as value from dual;
   type tab_list is table of c1%rowtype;
   t_list tab_list := tab_list(  here i want to place my static data );

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center