December 19, 2009 at 2:34 pm
I have a table called Log which keeps the log for all the files uploaded to the database.
In it, there is a column called FILES, which retained all the files processed as well as their location, for example, e:\uploaded\vendorA.txt. How can I code so that I got only the name of the file vendora.txt.
Thanks,
QJLEE
December 19, 2009 at 2:52 pm
A couple hints,
use reverse, then charindex to find the "\" and then substring.
December 19, 2009 at 3:13 pm
Can you please be more specific?
Thanks,
December 20, 2009 at 10:48 am
QQ-485619 (12/19/2009)
Can you please be more specific?Thanks,
Yes, but then you'd miss out on all the fun. 😉 Did you lookup REVERSE in Books Online? Also lookup CHARINDEX which will also be necessary.
This is a simple problem and 15 minutes of effort on your part will likely produce the results you want and you'll learn something new in the process so you won't have to ask the same question next time. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply