Home » SQL & PL/SQL » SQL & PL/SQL » 2d position array/varray in plsql (array, varray, cursor)
2d position array/varray in plsql [message #401862] Wed, 06 May 2009 13:07 Go to next message
sammeras
Messages: 28
Registered: September 2007
Location: Israel
Junior Member

Hello,
I have a table with 120 rows, i want to load this table to 2d array (x,y).
The table had 12 columns.
How can i loop this table to load the data to array.
I want print data with position in array, something like that:
dbms_output.put_line(ARR_CUR(0,0)) >> will print the first field in the first row.
dbms_output.put_line(ARR_CUR(1,2)) >> will print the seconf field in the 3'th row.
dbms_output.put_line(ARR_CUR(1,2)) >> will print the seconf field in the 3'th row.

ARR_CUR - is an array,varray OR a cursor.


Thanks guys'
Re: 2d position array/varray in plsql [message #401868 is a reply to message #401862] Wed, 06 May 2009 13:15 Go to previous messageGo to next message
sammeras
Messages: 28
Registered: September 2007
Location: Israel
Junior Member

sorry for duble messages Embarassed
Re: 2d position array/varray in plsql [message #401873 is a reply to message #401862] Wed, 06 May 2009 13:36 Go to previous messageGo to next message
Michel Cadot
Messages: 64119
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post a working Test case: create table and insert statements along with the result you want with these data.

Please read OraFAQ Forum Guide.
Also always post your Oracle version (4 decimals).

Regards
Michel
Re: 2d position array/varray in plsql [message #401879 is a reply to message #401873] Wed, 06 May 2009 15:15 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
useful link
http://sheikyerbouti.developpez.com/collections/collections.htm


Be sure to read the difference between Index-by tables (PL/SQL tables) and Varrays before selecing one or the other.

[Updated on: Wed, 06 May 2009 15:17]

Report message to a moderator

Re: 2d position array/varray in plsql [message #401950 is a reply to message #401879] Thu, 07 May 2009 02:21 Go to previous messageGo to next message
sammeras
Messages: 28
Registered: September 2007
Location: Israel
Junior Member

I didn't fint what i am looking for Sad
It must be simple thing, is it ?
what i am looking for, 2d array with all table data (as grid).


Thanks.
Re: 2d position array/varray in plsql [message #401966 is a reply to message #401950] Thu, 07 May 2009 02:56 Go to previous message
Michel Cadot
Messages: 64119
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you posted what I asked maybe we'd be able to better understand what you want and answer you more accurately.

Regards
Michel
Previous Topic: Help in SQL Query (Merged)
Next Topic: how to encrypt column data
Goto Forum:
  


Current Time: Tue Dec 06 08:22:42 CST 2016

Total time taken to generate the page: 0.05194 seconds