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
 General SQL Server Forums
 New to SQL Server Programming
 trim

Author  Topic 

kgundava
Yak Posting Veteran

66 Posts

Posted - 2011-08-08 : 16:13:30
Hello All,
I have a lengthy string stored in a variable called @CLAUSE VARCHAR(MAX).
The string is something like this "test3=test3 and test1=test and"
Now i do not want 'and' which is present at the end of the string(right hand side).Please let me know how can i do it.

Thanks....


Ghanta
Yak Posting Veteran

96 Posts

Posted - 2011-08-08 : 16:17:42
use substring(@string, 0, len(@string)-3) something like that
Go to Top of Page
   

- Advertisement -