Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding Specific Position in a String

Status
Not open for further replies.

Zurich98

Programmer
Apr 8, 2006
64
US
hello all,

I only want the string after the second "\" in the string below:

'C:\DailyReports\April2010'

How can I accomplish this? Your help/suggestion is greatly appreciated.

Thanks
 
On the assumption you're using T-SQL, look up the string function CHARINDEX.
You may need to use it twice to get the second occurence if the first is variable.

soi là, soi carré
 
A good start would be to take a look at CHARINDEX and SUBSTRING functions in BOL.

Beir bua agus beannacht!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top