Re: CLOB > 4k
Date: Thu, 11 Jun 2015 11:44:29 +0200
Message-ID: <CALH8A92DeZT-r5dN8UXkWn6=pLFPN1DLP5YABq+Y0fv8k6s9PA_at_mail.gmail.com>
In 11.2 you can not extend VARCHAR2 beyond 4000 byte. If you want to be DB independent in your ORM, you limit yourself to use only the features available on all DBs, but obey any limitation on any DB. But that's another discussion ....
For your specific case you need to find out what's the smallest VARCHAR2
size in all the to_be_supported DBs is. Then create a dedicated table to
store these (with a FK on your original table) and a method in sqlalchemy
to split up any textfile larger into pieces with references (FK) and
orders.
For retrieving the data, concatenate it in another Method.
If you need to do any string manipulation, the savings for using an ORM
will vanish soon.
sorry for the not-so-simple answer,
Martin
2015-06-11 11:35 GMT+02:00 Jose Soares Da Silva <jose.soares_at_sferacarta.com> :
> here is my version:
>
> Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
>
> j
>
>
> On 10/06/2015 16:18, Mladen Gogala (Redacted sender mgogala_at_yahoo.com for
> DMARC) wrote:
>
> Depending on your database version, you maybe able to insert 32K VARCHAR2
> data into your database.
>
> On 06/10/2015 05:12 AM, Jose Soares wrote:
>
> Hi all,
>
> I need to store a lot of data into a single column (more than 4k).
> I tried using CLOB because documentation says :
>
> *CLOB data type*
>
> *A CLOB (character large object) value can be up to 2,147,483,647
> characters long. A CLOB is used to store unicode character-based data, such
> as large documents in any character set.*
>
> *The length is given in number characters for both CLOB, unless one of the
> suffixes K, M, or G is given, relating to the multiples of 1024, 1024*1024,
> 1024*1024*1024 respectively. *
> ------------------------------------
>
> When I tried to insert into it more than 4 k a got this error:
>
> (DatabaseError) ORA-24373: invalid length specified for statement
>
>
> j
>
>
>
> --
> Mladen Gogala
> Oracle DBAhttp://mgogala.freehostia.com
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Jun 11 2015 - 11:44:29 CEST