Hi, how do i extract multiple values from a string with RegExp constructs with Oracle SQL?
I have looked at the various examples but can not figure this out .
the following Sql
select
regexp_substr(sessie."rollen", 'CN=A_role') "A_role"
from (
select '
CN=A_role,OU=a_org_unit,OU=another_org_unit,DC=bz,DC=ad,DC=min,DC=local
CN=Another_role,OU=some_org_unit,DC=bz,DC=ad,DC=min,DC=local
CN=Users,OU=Dep,DC=bz,DC=ad,DC=min,DC=local
' "rollen" from dual
) sessie;
just returns
CN=A_role.
I want it to return
all of the
CN= values concatenated with a semicolon and stripped from the
CN= bit.
So:
A_role;Another_role;Users .
Any help would be deeply appreciated. I am using 11g 11.2.0.2.0 database here.
Does anybody have any idea how to do this in SQL ?
kind regards Mike