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.

Position of next numeric value in Oracle SQL

User_HUQ7HMay 10 2021

I have am trying to extract certain IDs from the comments column. Comments columns includes alpha numeric, only numeric, only alphabet values but I need to extract ID which will be 5 characters and plus.
Is there a code to select only records with numeric values which are consecutive like 19555? If numeric values are between characters like AB22CD33EF55 are not valid IDs.
I was think of a process of identifying first numeric value as T1 and next non-numerical value as T2. Then my filter set is going to be (T2 = 0) OR ((T2 - T1) > 4). Need help to determine T2 or any alternative approach.
REGEXP_INSTR(COMMENTS, '[0-9]') == 4 (eg ACB19955)

COMMENTS
----------------
ABCDE
ACB19955
AB19CDEF
16448
TYU223IO
--17663
TY18667
AB15889CD

RESULTS
------------
19955
16448
17663
18667
15889

This post has been answered by Frank Kulash on May 10 2021
Jump to Answer

Comments

Post Details

Added on May 10 2021
2 comments
432 views