Link to home
Start Free TrialLog in
Avatar of Promethyl
PromethylFlag for United States of America

asked on

How do I use replace to remove single quotes and commas?

I have a column called VirtualTours in which I want to remove single quotes and commas. I am trying to use the replace function. See below (incorrect) example.

BEGIN TRAN; UPDATE    listings
                              SET              [virtualtours] = replace('''', '', [virtualtours]);
                                                         SELECT     VirtualTours
                                                          FROM         listings
                                                          WHERE     LEN(VirtualTours) > 1; ROLLBACK;

For example, I have 'vt',   and I want it to return vt.
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial