Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 string manipulation

Author  Topic 

1fred
Posting Yak Master

158 Posts

Posted - 2002-11-11 : 12:15:03
Is there a fucntion in T-SQL that does the same thing that CHARINDEX but reverse. Here is a sample of my data
click1.base.sample
click1.base.action.return
click1.base
click2.base.tracking.clip.position

I would like to get the word after the last "." for each row. The thing is to get the position of the the last "." from each row, then I'm using the RIGHT fucntion

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-11-11 : 12:20:52
RIGHT(colName, CHARINDEX('.', REVERSE(colName))-1)


Go to Top of Page
   

- Advertisement -