Home » SQL & PL/SQL » SQL & PL/SQL » record type - Urgent help required
record type - Urgent help required [message #210409] Wed, 20 December 2006 12:40 Go to next message
urchin556
Messages: 42
Registered: March 2005
Location: India
Member

Hi Guys,

Hi ,

I have a package which uses a record type(defined in specification)


TYPE cont_rec IS RECORD
(cont_id Number
,cont_number Number
,cont_number_modifier Number
,s_l_id Number);

TYPE cont_tbl IS TABLE OF cont_rec INDEX BY BINARY_INTEGER;

and in package body a procedure is called

go_cont(p_id In Number,
x_name in Varchar2,
x_con out cont_tbl
x_tab1 out vARCHAR2);

I need to write a procedure to call go_cont procedure in it..get the data from record type out parameter and manipulate it.
The problem is i dont know how to retrieve the data from a record type.
Please help me.
Re: record type - Urgent help required [message #210445 is a reply to message #210409] Wed, 20 December 2006 19:19 Go to previous message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
DECLARE
  x_con YOUR_PACK.cont_tbl;
  ...
  i INTEGER;
BEGIN
  go_cont(p_id, x_name, x_con, x_tab1);
  
  FOR i IN x_con.FIRST .. x_con.LAST LOOP
    dbms_output.put_line(x_con(i).cont_id);
  END LOOP;
END;


Or something like that.

Ross Leishman
Previous Topic: GPM
Next Topic: Decode function (merged)
Goto Forum:
  


Current Time: Tue Dec 10 03:25:33 CST 2024