Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: help with xmltype column larger than 4000 bytes

Re: help with xmltype column larger than 4000 bytes

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Wed, 14 Jul 2004 18:14:31 -0700
Message-ID: <1089854089.929571@yasure>


Comments in-line.

roger wrote:

> Daniel Morgan <damorgan_at_x.washington.edu> wrote in news:1089781821.385687
> @yasure:
>

>>VARCHAR2 columns max at 4K bytes. VARCHAR2 variables at 32K.

>
>
> Huh? Did you mean VARCHAR at 4k and VARCHAR2 at 32k?

No. I mean't exactly what I said.

>>XML should be stored as a CLOB or using the internal XML data type.
>>

>
> Yes, I am using sys.xmltype as the column definition, and as I
> say, I have no problem storing xml documents of any size.
>
> But, if I do
> select cast(xlmcol as varchar2(8000)) xml from mytable
>
> I get an error:
> ORA-00910: specified length too long for its datatype
>
> If I use varchar2(4000) then all the pretty xml comes out.
>
> So, if there's some way to use a varchar or varchar2 or
> whatever, that is bigger than 4K, please help me see it.
>
> Thanks again.

Try getting it out as a CLOB. Does that work?

Daniel Morgan
damorgan_at_x.washington.edu
(replace 'x' with 'u' to reply) Received on Wed Jul 14 2004 - 20:14:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US