Saturday, February 25, 2012

No Trim Function?

Hi,
Is there an equivalent to the TRIM() function in SQL Server to remove any
leading or trailing blank spaces in a string variable?
Please advise.
Thanks,
-JoeSELECT LTRIM(RTRIM(' foo '))
"Joe Rigley" <jcrigley@.spartanmotors.com> wrote in message
news:eXkEC0jrFHA.3476@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there an equivalent to the TRIM() function in SQL Server to remove any
> leading or trailing blank spaces in a string variable?
> Please advise.
> Thanks,
> -Joe
>|||RTRIM / LTRIM (look in the BOL)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Joe Rigley" wrote:

> Hi,
> Is there an equivalent to the TRIM() function in SQL Server to remove any
> leading or trailing blank spaces in a string variable?
> Please advise.
> Thanks,
> -Joe
>
>|||Ahh! Thanks much!
BOL? What is that and how do I locate?
-Joe
"Jens Smeyer" <Jens@.[Remove_that][for contacting me]sqlserver2005.de>
wrote in message news:FBEB9AF1-211B-4B5B-8572-9D00F041C791@.microsoft.com...
> RTRIM / LTRIM (look in the BOL)
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
> "Joe Rigley" wrote:
>|||BOL = Books Online.
http://www.aspfaq.com/2229
"Joe Rigley" <jcrigley@.spartanmotors.com> wrote in message
news:usv1t%23jrFHA.3796@.TK2MSFTNGP11.phx.gbl...
> Ahh! Thanks much!
> BOL? What is that and how do I locate?
> -Joe
> "Jens Smeyer" <Jens@.[Remove_that][for contacting me]sqlserver2005.de>
> wrote in message
> news:FBEB9AF1-211B-4B5B-8572-9D00F041C791@.microsoft.com...
>

No comments:

Post a Comment