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.
| Author |
Topic |
|
frank6666
Starting Member
2 Posts |
Posted - 2010-12-20 : 09:22:10
|
| HiThat's my first post here...I am trying to remove the end of a sentence in a SQL result but I don't know how to do it.My result look like this: "Smith, John (Test1 - Test2)"I want the result to be: "Smith, John". The bits to remove will always be "(Test2 - Test2)", that part won't change from one user to another.What kind of SQL functions can I use to remove the end of the sentence?Thanks |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2010-12-20 : 09:31:51
|
| SELECT REPLACE(yourField,' (Test1 - Test2)','')JimEveryday I learn something that somebody else already knew |
 |
|
|
frank6666
Starting Member
2 Posts |
Posted - 2010-12-20 : 10:03:16
|
| Thanks jimfThat is exaclty what I was looking for! |
 |
|
|
|
|
|