Hi,
I have a table that stores ID as a varchar but includes names alongside the ID. I have a requirement to extract only the value inside the brackets as the ID, see sample data below:
create table test( id varchar2(30),
start_date date)
;
insert into test values('Joe Bloggs (HJUTJFDK)', '09/11/2009');
insert into test values('Someone Else (GFHG JGK)', '09/11/2009');
insert into test values('AGHFJDKK', '09/11/2009');
insert into test values('TRUTIRUT', '09/11/2009');
Expected output:
ID
HJUTJFDK,
GFHG JGK,
'AGHFJDKK',
'TRUTIRUT'
I have tried the following regexp_substr(ID,'[^(]*$') but this returns the close bracket too )