Saturday, February 25, 2012

Removing Commas

i would greatly appreciate if someone could tell me how to remove all the co
mmas from an address table, its causing an excel export to dislocate.
i've tried the "STUFF" predicate but not sure exactly how this works and i a
lso cant use WRITETEXT or UPDATETEXT because they both use TEXTPTR which onl
y works with data of type text,ntext and image and the data i'm trying to up
date is a varchar.
many thanks
AdeyHi
Can you try REPLACE function.
update employee
set name = replace(name,',',' '), address=replace(address,',','')
Thanks
Hari
MCDBA
"Adey" <anonymous@.discussions.microsoft.com> wrote in message
news:125C7857-BC05-4996-9FD4-4E6577A17B4B@.microsoft.com...
> i would greatly appreciate if someone could tell me how to remove all the
commas from an address table, its causing an excel export to dislocate.
> i've tried the "STUFF" predicate but not sure exactly how this works and i
also cant use WRITETEXT or UPDATETEXT because they both use TEXTPTR which
only works with data of type text,ntext and image and the data i'm trying to
update is a varchar.
> many thanks
> Adey|||just tried it... and it works.
Many thanks
Adey

No comments:

Post a Comment