Most SQL servers should support LPAD() and RPAD().
The syntax for these functions are "LPAD(string, length, pad)".
The padding is space by default, but just set it to "0" to use zeros.
Mainly notes to future-Twig (and for anyone else who may find them useful)
If you've found one or more of my blog posts helpful, why not say thanks by buying me a coffee or beer?
Most SQL servers should support LPAD() and RPAD().
The syntax for these functions are "LPAD(string, length, pad)".
The padding is space by default, but just set it to "0" to use zeros.