Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Odd results from TO_CHAR()
Why does this happen:
select 'x'||to_char(1,'00')||'x' from dual;
returns: 'x 01x'
I would have expected: 'x01x'
I know I could do: select 'x'||ltrim(to_char(1,'00'))||'x' from dual; to get the same result but it seems convoluted.
Oracle7 Server Release 7.3.2.3.0 - Production Release
PL/SQL Release 2.3.2.3.0 - Production
CORE Version 3.5.2.0.0 - Production
TNS for HPUX: Version 2.3.2.1.0 - Production
NLSRTL Version 3.2.2.0.0 - Production
Phil Bolduc
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Jan 25 1999 - 19:50:01 CST