Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getting numeric or value error when using to_char

user474583Feb 4 2007 — edited Feb 6 2007
folks,

the following scenario is giving me a "numeric or value error: character string buffer too small" and I can't see why it should.

database column "a" is defined as varchar(22). I am trying to move the value from the database column to a variable "b" defined as char(6) using the statment

b := to_char(a,'000000');

this gives me the above error but once I define "b" as char(7) it works fine. What am I missing here. Is there an extra space at the beginning when using to_char for some reason.

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2007
Added on Feb 4 2007
5 comments
2,077 views