If you're looking to get the last underscore of a specific string than you can use the Locate function like this:
This will return you the numeric position of the last underscore in your string.
"What I need is the position of the Nth occurrence of that underscore(which basically INSTR() function in SQL does). Is there any alternate way of deriving it?" -- use the INSTR() in the PHYSICAL mapping on the logical column in the RPD... this way the function is shipped back to the database which can handle it better than OBIS/OBIPS.
Thanks Pedro! It worked. Appreciate your help!
Thanks Thomas for the response! It looks like a more performance friendly solution. I will definitely try it next time I make changes in the RPD. For this time, I needed a quick solution and I used LOCATE('','', -1) in the report.