Reputation: 115
Here is the code that I am using currently, I am trying to replace commas and periods in my database but right now it is only doing one or the other. Thanks
(Case when dim.obligorname like '%,%' then Replace(DIM.[ObligorName], ',', ' ')
Else case when dim.obligorname like '%.%' then Replace(DIM.[ObligorName], '.', ' ')
Else Dim.ObligorName end end) as Obligorname,
Upvotes: 0
Views: 196
Reputation: 3846
Why not just try something like this:
UPDATE myTable DIM
SET DIM.[ObligorName] =
Replace(Replace(DIM.[ObligorName], ',', ' '), '.', ' ')
Upvotes: 3
Reputation: 3127
How about something like this:
Replace( Replace(DIM.[ObligorName], ',', ' '), '.', ' ')
Upvotes: 2