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

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Table question

PL/SQL Table question

From: Olaf F. Normann <olafn_at_runit.no>
Date: Tue, 20 Nov 2001 16:33:18 +0100
Message-ID: <1006270399.648665@halvan.trd.sintef.no>


Hello!

I need to return data stored in a PL/SQL table (from a stored procedure) as it was a ordinary database table. I was thinking of using a method like:

But it doesn't seem to work:
DECLARE TYPE type_sum_rec IS RECORD (v_prosjekt_id number(10), v_navn prosjekt.navnTYPE);

TYPE type_sum_tab IS TABLE OF type_sum_rec INDEX BY BINARY_INTEGER;

sum_tab type_sum_tab;

BEGIN sum_tab(1).v_prosjekt_id := 1;

sum_tab(1).v_navn := 'test';

sum_tab(2).v_prosjekt_id := 2;

sum_tab(2).v_navn := 'olaf';

select sum_tab FROM Dual;

END; Olaf Received on Tue Nov 20 2001 - 09:33:18 CST

Original text of this message

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