getting numeric or value error when using to_char
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