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!

to_char gives extra space.

561944Jun 4 2007 — edited Jun 4 2007
ISSUE/PROBLEM:If I run the following query below, I get the associated output.
SQL> select 'abc'||to_char(88,'000') col1,
2 length(to_char(88,'000')) col2
3 from dual;

COL1 COL2
------- ----------
abc 088 4

NOTE: there are two distinct values in the record : "abc 088" and "4" the formatting of the posting just doesn't like spaces.
QUESTION: Why does the to_char add an extra space to the front of the output even though you have specified a particular 3 character format?

Message was edited by:
Greg Stuart

null
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 2 2007
Added on Jun 4 2007
3 comments
1,861 views