Unanswered: how to pad numbers with zero to a specified width
I am running on oracle 10g. I have values with number datatype that I wish to pad with zeros (0) from the LEFT to a specified width. the values have varying width and some of the numbers are negative numbers.
When i try to pad with LPAD function having converted the data to character datatype, it pads with zeros well but the negative numbers have their padding with 0s coming first before the negative sign making it look like an hyphen. e.g 0000000-943 instead of -00000000943. My desired result is -00000943 and not 00000-943. Please can someone help with this?