Derek Long
Derek Long

Reputation: 1219

Replacing Double Quotation to Single Quotation is SQLITE

How can I replace double quotes with single quotes:

I've tried:

UPDATE table SET COLUMN=REPLACE(COLUMN,'''',''') 

but it didn't work.

Upvotes: 0

Views: 1292

Answers (2)

Himanshu
Himanshu

Reputation: 32602

Try this:

UPDATE table SET COLUMN=REPLACE(COLUMN,'''''','''')

See this SQLFiddle

We have to escape the single quote. If you want to write ' you have to write ''. For more see this.

Upvotes: 3

juergen d
juergen d

Reputation: 204766

You need to escape the quote. Try

UPDATE your_table SET col = REPLACE(col, '''''' ,'''')

Upvotes: 1

Related Questions