Link to home
Start Free TrialLog in
Avatar of dan_stan
dan_stan

asked on

Function to select data between two characters

Hi,

I have lines in my database like the below-

Call assigned to the ABCD-NL/SALES/OFFICE01/ group by DSTN (switched in group context)

Call assigned to the ABCD-NL/ADMINISTRATION/OFFICE01/ group by DSTN (switched in group context)


I want to be able to select fields in between the first two slashes -

SALES
ADMINISTRATION

Can you help me?
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dan_stan
dan_stan

ASKER

SELECT SUBSTRING(SUBSTRING_INDEX(updatetxt, '/', 2),30)
,updatetxt as department From updatedb



This did the trick, not the prettiest, but it works!

Thanks