Re: i can't insert 'a''a' in a field with size 3
From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Tue, 11 Mar 2008 20:19:07 +0100
Message-ID: <47D6DB2B.9080508@arcor.de>
>
> Not in this case. Both "a" and "'" are only one byte long in UTF-8, and
> UTF-16 is not a valid database character set.
>
> But you are right that a weird character set might be at fault!
>
> Yours,
> Laurenz Albe
Date: Tue, 11 Mar 2008 20:19:07 +0100
Message-ID: <47D6DB2B.9080508@arcor.de>
Laurenz Albe schrieb:
> Gints Plivna <gints.plivna_at_gmail.com> wrote:
>>> i run >>> INSERT INTO test (FIELD1) VALUES ('a''a') >>> but DBMS oracle returns this error: >>> ORA-01401: inserted value too large for column >>> (FIELD1 size is 3!) >>> what's the error? >> Might be one of unicode charsets having each symbol more than one byte >> and column size defined in bytes not chars. Check DB charset and >> whether column is defined as char or byte.
>
> Not in this case. Both "a" and "'" are only one byte long in UTF-8, and
> UTF-16 is not a valid database character set.
>
> But you are right that a weird character set might be at fault!
>
> Yours,
> Laurenz Albe
Some gui tools don't take in account characterset semantics and show for
table created as
create table(field varchar2(1 char) 3 or 4 for the column length
(depending on characterset). So, the first thing i would ask - how did
OP come to the conclusion, that field has size 3...
Best regards
Maxim Received on Tue Mar 11 2008 - 14:19:07 CDT