I have a varchar column. The values are separated using a comma (,).
For example, the column values are as follows:
I would like to extract the last value from each column. With respect to the above example, the output should be as follows:
I know that we should use substring function to do this, but I am not sure how I can find out the value after '-' in the reverse direction.
Thanks in advance.
select substr('P1-101-Part1-This is a part',instr('P1-101-Part1-This is a part','-',-1)+1) from dual
answered May 10 '10 at 04:29 AM