October 11, 2002 at 8:52 am
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))
WooGor
WooGor
October 11, 2002 at 8:57 am
You have the ltrim to trim the left spaces and the rtrim to trim the right spaces. If you want to trim both you can nest them like this:
select rtrim(ltrim(au_lname)) from authors
April 20, 2006 at 1:03 am
i have one query.If i want to trim the spAces in between a string then how to do that.eg 'United States' i want to trim as 'UnitedStates' in SQL
April 20, 2006 at 2:13 am
REPLACE(Country, ' ', '')
_____________
Code for TallyGenerator
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply