Remove Trailing Spaces and Update in Columns in SQL Server -



Remove Trailing Spaces and Update in Columns in SQL Server -

i have trailing spaces in column in sql server table called company name.

all info in column has trailing spaces.

i want remove those, , want have info without trailing spaces.

the company name "amit tech corp "

i want company name "amit tech corp"

please help me in this.

--agmraja

try select ltrim(rtrim('amit tech corp '))

ltrim - removes leading spaces left side of string

rtrim - removes spaces right

ex:

update table set companyname = ltrim(rtrim(companyname))

sql sql-server-2008 trailing

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

r - url in CRAN extension manual -

asp.net - .NET Control.ID property inconsistency -