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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 TRIM Function in SQL?

Author  Topic 

WooGor
Starting Member

2 Posts

Posted - 2002-10-11 : 10:40:42
With VBScript, I use TRIM to take out the speces in a string value, what should I use with SQL?

For example,

SELECT TRIM(City)
From T_City
WHERE (NOT (City IS NULL))
Please help!

Thank you!

monkeybite
Posting Yak Master

152 Posts

Posted - 2002-10-11 : 10:49:30
In T-SQL, you have RTRIM() and LTRIM().
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_7oqb.asp[/url]

-- monkey

Go to Top of Page
   

- Advertisement -