select replace(replace(replace(LTrim(RTrim(' 6 Spaces 6 Spaces. ')),' ',' |'),'| ',''),
--'|','')
' |','')
select replace(
replace(
replace(
LTrim(RTrim(' 6 Spaces 6 Spaces. '))
,' ',' |')
,'| ',''),
' |',' ')
--Trim the field
--Mark double spaces
--Delete double spaces offset by 1
--Tidy up
No comments:
Post a Comment