Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pl/sql table type 1

Status
Not open for further replies.

miraora

Programmer
Jan 6, 2007
26
US
i have data od forllowing formate and want to store and process and again store in table
record

Name count
smith 1
smith 2
alen 2
alen 1
smith 2
and so on. i would like to store that in collection pl/sql table ( type)
and wants out put in follwing maner again store in pl/sql table
name total count
smith 5 (i.e 1+2+2)
alen 3 (i.e 1+2)
i would like to it in plsql loop for larger data .so can any one help with that
I would really appreciate it.
 
You could do this using a record type e.g.

Code:
declare
   type t_user is record (user_name varchar2(20),
                          user_count number);
   type t_user_arr is table of t_user index by binary_integer;
   v_user_arr t_user_arr;
begin
  v_user_arr(1).user_name := 'Smith';
  v_user_arr(2).user_count := 1;
  ...
end;
 
Thank you for you help Dagon,
I can store the data but what about the process of adding in the table and string in another table
 
I don't know what you mean. What are you trying to do exactly ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top