Using MYSQL, I have a varchar column and I need to execute a select, repeating/padding the return value according to the leading zeros, for example:
| ID | Return |
|---|---|
| 000001 | XXXXX000001 |
| 011111 | X011111 |
Basically if the string have leading zeros I need to padding the return value with the same X value
Is it even possible? I've been searching about, I've tried LPAD, TRIMM, but I can't figure it out
Thanks!!!