Charlottecb
Hall of Fame
Points: 3932
More actions
March 5, 2004 at 6:40 am
#107930
Hi all,
I need to search a field in all rows of a table for tab characters and replace them with spaces. Can anyone help me with a script for this.
Thanks
CCB
DavidT
SSCommitted
Points: 1727
March 5, 2004 at 6:54 am
#497531
do a replace on the ascii number for a tab:
select ascii(' ') -- 9
update table set field = replace(field,char(9),' ')
/* optionally*/ where field like '%' + char(9) + '%'
March 5, 2004 at 7:59 am
#497553
Perfect.
Thank you
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply