Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Bhogesh.

Asked: February 16, 2017 - 5:35 pm UTC

Last updated: February 17, 2017 - 3:37 am UTC

Version: 12c

Viewed 1000+ times

You Asked

i have a table A and in that column B.

column b has below data.

sdkjksdfFDOR:1234;
wwerwerrFDOR:12344;

how to read the data after FDOR: and upto ';'

my output should be
1234
12344

Please help me.

Regards.
T.prasad

and Connor said...

SQL> with t as
  2  ( select 'sdkjksdfFDOR:1234;' c from dual )
  3  select
  4    rtrim(substr(c,instr(c,'FDOR:')+5),';')
  5  from t;

RTRI
----
1234



Is this answer out of date? If it is, please let us know via a Comment