Wednesday, March 28, 2012

Remove Comma from rows in table

Hello,
My schema is as follows:
Create table Test (Emailaddress varchar(50))
I have numerous rows that have a comma after the emailaddress and I need to
remove the comma. Example
jonsamules@.aol.com,
Any help would be great.Look up the REPLACE function in the Books Online.
Lontae Jones wrote:
> Hello,
> My schema is as follows:
> Create table Test (Emailaddress varchar(50))
> I have numerous rows that have a comma after the emailaddress and I need t
o
> remove the comma. Example
> jonsamules@.aol.com,
> Any help would be great.|||"Lontae Jones" <LontaeJones@.discussions.microsoft.com> wrote in message
news:ABB60657-A5B5-4CB6-9FDE-3CCF2C4BCA47@.microsoft.com...
> Hello,
> My schema is as follows:
> Create table Test (Emailaddress varchar(50))
> I have numerous rows that have a comma after the emailaddress and I need
> to
> remove the comma. Example
> jonsamules@.aol.com,
> Any help would be great.
Try the REPLACE function.
UPDATE Test
SET Emailaddress = REPLACE(Emailaddress, ',' ,'')
Rick Sawtell
MCT, MCSD, MCDBA

No comments:

Post a Comment