Is there a way to remove specific characters from SQL Server Column

11,567
Update tbl
SET price = replace(price, '$', '')

Here is the replace definition

Share:
11,567

Related videos on Youtube

user125264
Author by

user125264

Updated on June 26, 2022

Comments

  • user125264
    user125264 about 2 years

    I have a database table that contains a column for pricing.

    Its very old, so it was written before i understood datatypes. so we are using varchar for a money value.

    Ive noticed some columns have $ in them, so what I'm wondering is... is there a way with SQL Server to perform an update of the table and remove any instances of non numeric characters or at the very least remove the $ from the string in the columns in one go ?

    I hope this is possible.