Mickautsch, Alfred wrote:
Hello,

when I try to select from a table with a column of sys.xmltype ("select * from 
c041_dev.xmltest") I get the following error message:

DBD::Oracle::db prepare failed: ORA-22318: input type is not an array type (DBD ERROR: 
OCIAttrGet) [for Statement "select * from C041_DEV.XMLTEST"] at [...].

Can someone please tell me what I have to do to get the statement executed?

I am using Activestate perl 5.10.0, DBI 1.607 and DBD::Oracle 1.21 on Windows 
XP.
The release of the oracle database server is 9.2.0.8.0  and the client is 
10.2.0.1.0.

The table create statement is:

create table c041_dev.xmltest
(
  id integer primary key,
  xml sys.xmltype
);

insert into c041_dev.xmltest values(0, '<root/>');


Servus -- Alfred

--
Alfred Mickautsch

SCHULER Business Solutions AG
Karl-Berner-Str. 4
72285 Pfalzgrafenweiler
Deutschland
Tel:    +49 7445 830-184
Fax:    +49 7445 830-349
E-Mail: [email protected]
Web:    www.schuler-ag.com

SCHULER Business Solutions AG Aktiengesellschaft mit Sitz in D-72285 Pfalzgrafenweiler, Karl-Berner-Str. 4 Registergericht Stuttgart HRB 430947
Vorstand: Uwe Jonas, Harald Sieber
Vorsitzender des Aufsichtsrates: Achim Gauß



Sorry answer is so late after you posted but I marked your post as I knew I wanted to do this and I didn't get around to trying it until today.

select xmltype.getclobval(xmltype_column) from c041_dev.xmltest

should work but I'd be interested in anyone else thoughts on this as a straight select xmltype_column from table fails the prepare as Alfred has documented above.

I don't mind changing my perl to retrieve the column but I was hoping not to have to change my SQL. Anyone know what is going on with the prepare failing?

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

Reply via email to