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 |
oasis1
Starting Member
35 Posts |
Posted - 2012-10-02 : 16:57:25
|
Aloha I have the folowing value in a columnQ1 (All vers.) How carefully Prov. listenedI need to strip off the Q1 (All vers.) and last space before the How carefully Prov. listened. there are quite a few values similar so what I need is to get the values after the last ) in the values.. mahalo, Brew |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-10-02 : 17:01:36
|
this?SELECT RTRIM(LTRIM(CASE WHEN CHARINDEX(')',Field) > 0 THEN STUFF(yourfield,1,CHARINDEX(')',Field),'') ELSE Field END))FROM Table ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
oasis1
Starting Member
35 Posts |
Posted - 2012-10-02 : 17:04:58
|
Genius !!!! Much Mahalo !!!quote: Originally posted by visakh16 this?SELECT RTRIM(LTRIM(CASE WHEN CHARINDEX(')',Field) > 0 THEN STUFF(yourfield,1,CHARINDEX(')',Field),'') ELSE Field END))FROM Table ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
|
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-10-02 : 17:22:43
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|