Varchar2 and Char - Urgent [message #1970] |
Thu, 13 June 2002 22:13 |
Kjell
Messages: 7 Registered: February 2002
|
Junior Member |
|
|
Hi
I have a problem with varchar2 and char.
I have developed a procedure that fetches a varchar2 value from a table. This value I want to put into a char field in another table. When I try to do this I get the following error message:
ORA-01401: inserted value too large for column
The variable in the procedure i declared as a char(13) such as the receiving field.
Examples of values in the varchar2 field is '176000081117'.
How can this be solved??
|
|
|
Re: Varchar2 and Char - Urgent [message #1972 is a reply to message #1970] |
Thu, 13 June 2002 22:28 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Length is expressed in number of bytes, so if you're working with a multibyte character set, '176000081117' will require 12*2 = 24 bytes, or a CHAR of 24 bytes long.
Another possible cause might be that your string is being preceded or followed by one or more space characters (= ASCII 32). Try to verify what is the length of this field and if necessary, use LTRIM(RTRIM(field)) to eliminate unneccesary space characters (ascii 32).
HTH,
MHE
|
|
|