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 2005 Forums
 Transact-SQL (2005)
 Right

Author  Topic 

Brittney10
Posting Yak Master

154 Posts

Posted - 2013-11-18 : 18:51:16
How would I remove everything to the right of a string field after the second occurrence of a particular character?

Thanks for the help in advance.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-11-19 : 01:29:29
[code]select left(<string>, charindex(<character>, @str, charindex(<character>, <string>) + 1) - 1)[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -