Skip to content
Advertisement

oracle: format a number with slash

I have a column like this:

and I should write a query to display the column like this:

Advertisement

Answer

You could use:

This approach first left pads the input with zeroes to a length of 3. Then, it inserts a forward slash before the final two characters using a regex replacement.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement