How can I write a replace SQL query to replace a dash anywhere in a label field in a table with a space. The dash is an unsupported field and I have about 7000 records with dashes in various places within the particular field
update tab
set col =
substring(col from 1 for position ('-' in col) - 1)
|| ' ' ||
substring(col from position ('-' in col) + 1)
where position ('-' in col) > 0
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.