Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: NUMBER to CHAR conversion
to_char(1,'00') is ' 01', so it needs 3 characters (there's a
character for the sign).
If you don't want that you can use 'fm00' format:
v734> select '"'||to_char(1,'00')||'"' nb from dual;
NB
v734> select '"'||to_char(1,'fm00')||'"' nb from dual;
NB
--
Have a nice day
Michel
Alec Perminov <V.Prosekin_at_vaz.ru> a Êcrit dans le message :
8ch706$8ha$1_at_ss20.vaz.ru...
> Can anybody help me?
> Why the statement:
>
> INSERT INTO sample_table VALUES(TO_CHAR(1,'00'));
>
> returns error:
>
> ERROR at line 1:
> ORA-01401: inserted value too large for column
>
> There is 'sample_field' CHAR(2) in 'sample_table'. I thought the
statement
> have
> to write value '01' in the field. But it does not work. Why?
>
> Alec.
>
Received on Thu Apr 06 2000 - 02:25:13 CDT
![]() |
![]() |