-
I have a string:
c:\temp\sak\mat.exe
I am trying to get the following string:
mat.exe
In short anything after the last \.
Is there any way to get this as there are no left or right functions ( atleast I did not find them)
The length of string is not fixed and also the .extension, path.
Any help please
Thanks
Sonali
-
How about using substring counting the no. of characters from left and pick last characters (mat.exe). Just see the syntax. you might be interested in.
-
INSTR function can be used to find a n-th occurence of a particular character either forwards if n is positive or *backwards* if n is negative.
In your example, you would use something like this:
SELECT SUBSTR( 'c:\temp\sak\mat.exe', INSTR('c:\temp\sak\mat.exe', '\', -1)+1)) FROM dual;
HTH,
-
Looks like JModic has answers to all/any questions.
Not to say I tried all this but did not know -ve and +ve
use in Instr.
Thanks again
Sonali