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 SPACES

Author  Topic 

vladimir_grigoro
Yak Posting Veteran

62 Posts

Posted - 2004-07-30 : 05:47:52
Hi All,

I have a varchar column with values like:

AS 23 34 56
FD 21 34 45

and I want to make a query, which should return a result like:

AS233456
FD213445

e.g. I want to remove spaces in the values.

Thank you in advance.


The Rebel

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-07-30 : 05:51:56
look at the REPLACE function.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-30 : 08:44:02
SELECT REPLACE(column_name,' ','') AS column_name
FROM table

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -