hello to al,
I have to convert a number in char with 2 decimal of 9 char including comma(or point not mind), but I get this result
DF3 is right against DF2 (It have a blank as first string char).
Where am I wrong?
DF3 is right!! (9 char length with 2 decimal
DF2 is wrong because 10 char lenght
SELECT 10094.16 as df1,
TO_CHAR(NVL(10094.16 ,0),'000000.00') as df2,
substr (TO_CHAR(NVL(10094.16 ,0),'000000.00') ,2,10) AS DF3 ,
REPLACE (substr (TO_CHAR(NVL(10094.16 ,0),'000000.00') ,2,10),'.',',') AS DF4 FROM dual
or this
SELECT 10094.1 as df1,
TO_CHAR(NVL(10094.1 ,0),'000000.00') as df2,
substr (TO_CHAR(NVL(10094.1 ,0),'000000.00') ,2,10) AS DF3 ,
REPLACE (substr (TO_CHAR(NVL(10094.1 ,0),'000000.00') ,2,10),'.',',') AS DF4 FROM dual
Thanks in advance for any help
Thanks in advance