When executing my insert statement, I am receiving the error message
'string literal too long'. The field is an xml datatype and I am
inserting the xml as a string. Do I need to convert it to a clob? What
else might I need to do? Please advise.
Thanks.
Mark A - 24 Jun 2006 07:51 GMT
> When executing my insert statement, I am receiving the error message
> 'string literal too long'. The field is an xml datatype and I am
> inserting the xml as a string. Do I need to convert it to a clob? What
> else might I need to do? Please advise.
>
> Thanks.
Please indicate your DB2 version and operating system and whether you are
using XML Extender.
Nikki - 24 Jun 2006 15:35 GMT
> > When executing my insert statement, I am receiving the error message
> > 'string literal too long'. The field is an xml datatype and I am
[quoted text clipped - 5 lines]
> Please indicate your DB2 version and operating system and whether you are
> using XML Extender.
DB2 9 Viper on AIX
Thanks,
Nicole
Mark A - 24 Jun 2006 16:46 GMT
> DB2 9 Viper on AIX
>
> Thanks,
>
> Nicole
So you are using native XML support provided in DB2 9.1 (of which you have
beta copy since it has not been released yet)?
Serge Rielau - 24 Jun 2006 11:45 GMT
> When executing my insert statement, I am receiving the error message
> 'string literal too long'. The field is an xml datatype and I am
> inserting the xml as a string. Do I need to convert it to a clob? What
> else might I need to do? Please advise.
>
> Thanks.
I think the longest permissable literal in DB2 is ~32000 Bytes (not
characters in a unicode database!). So if your XML document in string
format exceeds that it will need to be CLOB and you need to bind it in
via a parameter marker or host variable.
(using parameter markers is a good thing anyway :-)
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
IOD Conference
http://www.ibm.com/software/data/ondemandbusiness/conf2006/