I have a string value I'd like to make more presentable:
'Course grade for <font color="#FF0000">Student Name</font>'
but my query to extract the Student Name:
SELECT SUBSTR(col, instr(col, '>',1,1)+1, instr(col, '<',1,2)) FROM my_table where course_id=1
returns Student Name</font> despite instr('<',1,2) returning the correct index.
I'm not sure why it doesn't stop on that index and returns the rest of the string. Ideally I'd like it to return Student Name
Many thanks!