Re: Query Error

From: onedbguru <onedbguru_at_gmail.com>
Date: Fri, 1 Apr 2011 19:51:03 -0700 (PDT)
Message-ID: <eadc9719-3f57-4615-ae8f-da8067135f5f_at_e21g2000yqe.googlegroups.com>



On Apr 1, 3:04 pm, The Magnet <a..._at_unsu.com> wrote:
> Hi,
>
> I'm trying to use DBMS_METADATA to get the DDL:
>
> SELECT     TO_CHAR(DBMS_METADATA.GET_DDL('TABLE',
> o.name,'DATA_HOLDER')) ddl_string
> FROM       sys.obj$ o,sys.tab$ t
> WHERE      o.owner# = 28
>   AND      o.obj# = t.obj#
>   AND      BITAND(o.flags, 128) = 0;
>
> ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion
> (actual: 4747, maximum: 4000)
>
> I cannot seem to get around that error no matter what I try.  Any
> suggestions?
>
> Thanks!

The more appropriate response is: you really need to learn data types and their sizes. VARCHAR2 (used by to_char) has a maximum size of 4000 bytes as stated by the error message.

see: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:367980988799 for an example of how to retrieve a clob into something useful. Received on Fri Apr 01 2011 - 21:51:03 CDT

Original text of this message