Hello all,
I have strings like that
OPEN SYSTEMS SUB GR (GM/BTIB(1111)/BTITDBL(2222)/BTVY(4444)/ACSVTYSAG)
and I need to extract 2222 from it.
What I was doing is this on the GROUPS String:
SUBSTRING(GROUPS, CHARINDEX('(',GROUPS, CHARINDEX('(',GROUPS, CHARINDEX('(',GROUPS,0)+1)+1)+1, 4 ) AS GroupNo
However I see that it is not very efficient and I ve been told to do it using the regex. I couldn't solve it. I hope if anyone can help me with it. Thanks.