Is there a way to pad 0s before numbers stored as VARCHAR in DB2?
Like this:
some_column result
----------- ------
12 ==> 00012
123 ==> 00123
6454 ==> 06454
Is there a way to pad 0s before numbers stored as VARCHAR in DB2?
Like this:
some_column result
----------- ------
12 ==> 00012
123 ==> 00123
6454 ==> 06454
If the function LPAD is available:
Otherwise you can use a combination of RIGHT and REPEAT: