By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,636 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

To print only the file name

P: 8
Hi all,

when we write a query to know backup of database from system table it gives us the full path,i.e

d:\new\dump\adba_databasename_tiemstamp.bkp

But i want only the filename as output i.e "adba_databasename_tiemstamp.bkp"
is there any string function to it.
Nov 18 '08 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
1. Reverse the string.

2. Get the position of the first "\".

3. Do a substring from the first position of the reversed string to the position of the first "\"..

Happy coding!

-- CK
Nov 18 '08 #2

P: 8
Thanks for your help......
Dec 18 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.