Reputation: 1014
I had a table with a string column. I removed the stopwords from the string and then the result look like this (which somehow connected to this link and What @IMSoP suggested for another case)
'would':2 'yellow':4
I want to get rid of these quotes and : and the numbers. I tried
UPDATE tblName SET colName= replace(colName, '\s?[a-zA-Z]\w:\d', '');
and also this
UPDATE tblName SET colName= replace(colName, ':\d', '');
but for selection, it works but does not replace it.
Upvotes: 1
Views: 525
Reputation: 1270021
How about using regexp_replace()
?
UPDATE tblName
SET colName = regexp_replace(colName, '[0-9:'']', '', 'g');
Upvotes: 1