How can I replace single-quote (') with double-quote (") in sql query - oracle 10g?
This should work:
UPDATE myTable
SET myField = REPLACE(myField, '''', '"');
You can use Ansi-codes as well, to make it more crystal what is happening:
SELECT someString
,replace(someString, Chr(39), Chr(34)) as replacedString
FROM (SELECT ' abc ' || Chr(39) || ' def ' as someString
FROM Dual)
39 is a single quote, 34 a double quote
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With