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
  #1  
Old   
Fici
 
Posts: n/a

Default i can't insert 'a''a' in a field with size 3 - 03-10-2008 , 10:38 AM






hi,
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?

Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

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






Fici wrote:
Quote:
hi,
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?
SQL> create table test (
2 field1 VARCHAR2(3));

Table created.

SQL> INSERT INTO test
2 (field1)
3 VALUES
4 ('a''a');

1 row created.

SQL> SELECT * FROM test;

FIE
---
a'a

SQL>

try the following in SQL*Plus:

show define

Post the result

If you are not using SQL*Plus then your front-end tool is
defective or needs to be reconfigured.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #3  
Old   
DA Morgan
 
Posts: n/a

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



Fici wrote:
Quote:
hi,
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?
SQL> create table test (
2 field1 VARCHAR2(3));

Table created.

SQL> INSERT INTO test
2 (field1)
3 VALUES
4 ('a''a');

1 row created.

SQL> SELECT * FROM test;

FIE
---
a'a

SQL>

try the following in SQL*Plus:

show define

Post the result

If you are not using SQL*Plus then your front-end tool is
defective or needs to be reconfigured.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #4  
Old   
DA Morgan
 
Posts: n/a

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



Fici wrote:
Quote:
hi,
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?
SQL> create table test (
2 field1 VARCHAR2(3));

Table created.

SQL> INSERT INTO test
2 (field1)
3 VALUES
4 ('a''a');

1 row created.

SQL> SELECT * FROM test;

FIE
---
a'a

SQL>

try the following in SQL*Plus:

show define

Post the result

If you are not using SQL*Plus then your front-end tool is
defective or needs to be reconfigured.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #5  
Old   
DA Morgan
 
Posts: n/a

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



Fici wrote:
Quote:
hi,
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?
SQL> create table test (
2 field1 VARCHAR2(3));

Table created.

SQL> INSERT INTO test
2 (field1)
3 VALUES
4 ('a''a');

1 row created.

SQL> SELECT * FROM test;

FIE
---
a'a

SQL>

try the following in SQL*Plus:

show define

Post the result

If you are not using SQL*Plus then your front-end tool is
defective or needs to be reconfigured.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #6  
Old   
Gints Plivna
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-10-2008 , 02:21 PM



On Mar 10, 6:38 pm, Fici <moretto.feder... (AT) gmail (DOT) com> wrote:
Quote:
hi,
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.

Gints Plivna
http://www.gplivna.eu


Reply With Quote
  #7  
Old   
Gints Plivna
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-10-2008 , 02:21 PM



On Mar 10, 6:38 pm, Fici <moretto.feder... (AT) gmail (DOT) com> wrote:
Quote:
hi,
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.

Gints Plivna
http://www.gplivna.eu


Reply With Quote
  #8  
Old   
Gints Plivna
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-10-2008 , 02:21 PM



On Mar 10, 6:38 pm, Fici <moretto.feder... (AT) gmail (DOT) com> wrote:
Quote:
hi,
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.

Gints Plivna
http://www.gplivna.eu


Reply With Quote
  #9  
Old   
Gints Plivna
 
Posts: n/a

Default Re: i can't insert 'a''a' in a field with size 3 - 03-10-2008 , 02:21 PM



On Mar 10, 6:38 pm, Fici <moretto.feder... (AT) gmail (DOT) com> wrote:
Quote:
hi,
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.

Gints Plivna
http://www.gplivna.eu


Reply With Quote
  #10  
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
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.