Richard Buchner, Chicago
Ten Centuries
Points: 1390
More actions
March 3, 2004 at 8:05 pm
#107439
What's a good way to remove embeded blanks from a char field.
For example ' 2 3.4' to '23.4'
or ' 1 456 9' to 14569
wz700
SSCertifiable
Points: 7133
March 3, 2004 at 8:10 pm
#497146
Replace
declare @i varchar(100)
set @i = ' 1 456 9'
set @i=replace(@i,' ','')
select @i
March 3, 2004 at 8:30 pm
#497148
Thanks WZ700, so you can REPLACE with nothing
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply