Why is Oracle\'s to_char() function adding spaces?
to_char()
select length(\'012\'), length(to_char(\'012\')), length(to_char(\'12\', \'000\')
To make the answers given more clear:
select '['||to_char(12, '000')||']', '['||to_char(-12, '000')||']', '['||to_char(12,'FM000')||']' from dual [ 012] [-012] [012]