Reputation: 135
I have a table that have two columns. First column is 'Word' column. Second column is 'Descripton' column. There are some records that have two spaces in Word column. I'd like to change two sequent spaces to one space. For example "Hello World" to "Hello World".
In Description column, some records contain turkish characters as html codes. For example 'Öay' instead of 'çay'. I want to change them to actual turkish characters.
I can do that by reading the table line by line with php but I'm wondering if there is an easy way to do that with sql.
Upvotes: 0
Views: 56
Reputation: 3963
You can use the REPLACE
function like this:
REPLACE (StringColumn, 'SearchForThis', 'ReplaceWithThis')
e.g.
REPLACE (StringColumn, ' ', ' ')
Upvotes: 2