Oracle, adding leading zeros to string (not number)

You can use the LPAD function for that, passing in the string, the length you want it to be, and the character to pad it with. For 10 digits with leading zeroes this would be:

LPAD('12H89', 10, '0')

The return value is the padded string.

See: http://www.techonthenet.com/oracle/functions/lpad.php

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)