Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How can I remove the text and leave only the numbers?

Hello,
Greetings, my version of Oracle is Oracle Database 19c 19.0.0.0.0.0.
I have a text (PURCHASEORDER988-01) and I need to remove the text and have the following result (988-01) when I run it. 

This would be the example:
---------------------
|      NUMBER       |
---------------------
|PURCHASEORDER988-01|
---------------------
|PURCHASEORDER100-10|
---------------------

But the result I need, as you can see, is as follows:
---------------------
|      NUMBER       |
---------------------
|988-01             |
---------------------
|100-10             |
---------------------

Then I don't know if you know of any function that separates the text from the numbers, I hope you can help me.
Thank you very much.

This post has been answered by L. Fernigrini on Oct 14 2021
Jump to Answer
Comments
Post Details
Added on Oct 14 2021
9 comments
4,403 views