My goal is to get all the substrings after the last occurene of the char hypen from the right in each string separated by hypen. Ive tried, but i’m getting wrong values if there are multiple “Hypen” encountered from the string. Is there any workaround or approach. Thank you in Advance.
my Code and sample:
sample input and result:
itemid —- value
AAAA-RB —- RB
AAAA-BBBB-PUB — BBBB-PUB — wrong values it should be “PUB”
554-18990 — 18990
substring(con.itemid,INSTR(con.itemid,’-‘)+1) as itemid_suffix,