Posted on 2009-03-12 19:50:44-07 by byterock in response to 10156
Re: Using Oracle VARRAY Data Types

Well in a word no.

The funny thing about varrys tables and objects is that is very easy to put the data into such a field with SQL but very hard to get it out.

CREATE or replace TYPE mytype as varray(10) of varchar(30);

CREATE TABLE atable ( aa_type mytype);

insert into atable values (mytype('1','2','3','4','5');

But the SQL to get it out would be about 30 lines of PSQL called with a function.

Now that I am saying this I do not see anything that would stop one from entering the data directly but the problem is you could not do it with standard SQL

you would want something like this

insert into atable values (?);

where ? is a single array of values. You would need some funny non sandard bind me thinks?

Anyway I will have a look at it as there is some interest out there

By they way no one but me actully look at this list (and I only when I have some spare time)

You would be much better off posting this at http://www.nntp.perl.org/group/perl.dbi.users/ or raise a RT ticket at http://rt.cpan.org/Dist/Display.html?Queue=DBD-Oracle

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.