Reputation: 110572
How would I do the following:
SELECT SUBSTRING_INDEX(log, 'Basic/urn:' OR 'Basic/urh:', -1)
In other words, I want to split on two different strings.
Upvotes: 0
Views: 35
Reputation: 1271151
I am guessing you just want this:
SELECT SUBSTRING_INDEX(log,
(CASE WHEN log like '%Basic/urn:%' THEN 'Basic/urn:' ELSE 'Basic/urh:',
-1)
Upvotes: 1