Quick and dirty, but it will work :-) You can expand and write it as a storage procedure using the table name, the character you want to replace, the character you want to replace, execute the String variable, etc.
DECLARE @TABLENAME VARCHAR(50) SELECT @TABLENAME = 'Locations' SELECT 'Update ' + @TABLENAME + ' set ' + column_Name + ' = REPLACE(' + column_Name + ',''"'','''')' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @TABLENAME and data_Type in ('varchar')
Jeff raines
source share