dbTalk Databases Forums  

i can't insert 'a''a' in a field with size 3

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss i can't insert 'a''a' in a field with size 3 in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-11-2008 , 03:34 AM






Gints Plivna <gints.plivna (AT) gmail (DOT) com> wrote:
Quote:
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


Reply With Quote
  #12  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-11-2008 , 03:34 AM






Gints Plivna <gints.plivna (AT) gmail (DOT) com> wrote:
Quote:
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


Reply With Quote
  #13  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-11-2008 , 03:34 AM



Gints Plivna <gints.plivna (AT) gmail (DOT) com> wrote:
Quote:
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


Reply With Quote
  #14  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-11-2008 , 01:19 PM



Laurenz Albe schrieb:
Quote:
Gints Plivna <gints.plivna (AT) gmail (DOT) 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


Reply With Quote
  #15  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-11-2008 , 01:19 PM



Laurenz Albe schrieb:
Quote:
Gints Plivna <gints.plivna (AT) gmail (DOT) 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


Reply With Quote
  #16  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-11-2008 , 01:19 PM



Laurenz Albe schrieb:
Quote:
Gints Plivna <gints.plivna (AT) gmail (DOT) 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


Reply With Quote
  #17  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-11-2008 , 01:19 PM



Laurenz Albe schrieb:
Quote:
Gints Plivna <gints.plivna (AT) gmail (DOT) 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.