If you need to find the string following the last the _ you could try to search from the end of a known length string like this (not pretty)
SELECT
CASE
WHEN SUBSTRING (my_string FROM 16 FOR 1) = '_'
THEN TRIM(SUBSTRING (my_string FROM 17))
WHEN SUBSTRING (my_string FROM 15 FOR 1) = '_'
THEN TRIM(SUBSTRING (my_string FROM 16))
WHEN SUBSTRING (my_string FROM 14 FOR 1) = '_'
THEN TRIM(SUBSTRING (my_string FROM 15))
WHEN SUBSTRING (my_string FROM 13 FOR 1) = '_'
THEN TRIM(SUBSTRING (my_string FROM 14))
etc
etc
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.