[Solved] Format a number 000..999 [closed]


It really isn’t clear where your numbers are coming from. if you just want to generate a list on the fly to you can use the connect-by syntax:

select to_char(level, 'FM00')
from dual
connect by level <= 10;

01
02
03
04
05
06
07
08
09
10

For 0 to 999 just change the level limit and the format model to have the required number of digits:

select to_char(level - 1, 'FM000')
from dual
connect by level <= 1000;

2

solved Format a number 000..999 [closed]