Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Search for last occurance of a substring

724687Jan 7 2010 — edited Jan 7 2010
How do I search for the last occurance of a substring in a string? More in detail: I have table with filenames, and I want to split of the extention of the filename into a seperate column. The extention doesn't have a fixed with (can be "c", "jpg" or "mpeg", etc...), and the filenames themselves can contain dots (so this is possible: "recording.of.last.meeting.mpeg".

So the only way to extract the extention is to search for the last occurance of a dot, and split off everything after the last dot. How can I do this? I worked with a sybase database before and there was a string function to start searching from the right of the string. Is there something similar in Oracle?
This post has been answered by Karthick2003 on Jan 7 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2010
Added on Jan 7 2010
18 comments
2,391 views