@domenico This can be done by using the 'lpad' function. The function requires three arguments: the first argument is the source string, the second argument is the resulting length of the target string and the third argument is the character to use to pad the source string. For example, if you want to pad a number with a length of 4 with a zero you could use:
1
|
SELECT LPAD('7', 4, '0'); |
This would return 0007.