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

charindex question

P: n/a
I have a field containing a string with '/' in it multiple times.

How can I return the charindex of the last occurance of '/' in the
string?

Regards,
Ciarán

Mar 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

declare @s varchar(10)
set @s='as/gf/af/h'
select len(@s)-charindex('/',reverse(@s))+1
Madhivanan

Mar 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.