469,299 Members | 2,050 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,299 developers. It's quick & easy.

charindex question

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
1 2094

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.

Similar topics

5 posts views Thread by M Wells | last post: by
2 posts views Thread by Little PussyCat | last post: by
5 posts views Thread by Willem | last post: by
3 posts views Thread by csomberg | last post: by
1 post views Thread by jeremy | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.