SQL – Remove chars from string

To be used when there’s the need or removing one or more chars from a record in a SQL table:

UPDATE TableName SET ColumnName = replace( ColumnName, '"', '' ); -- Remove commas

UPDATE TableName SET ColumnName = replace( replace(ColumnName, ',', ''), '"', '' );  -- Remove multiple chars: comma and quotes




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *