Reputation: 31
Select '"'||Address||'","'||zipcode||'"' from Address_table;
output:
"123 Main St Ave Apt 100","98765" -- Good Data
"312 Marco St Some Ave "Apt 3214"","76543" -- Bad Data
Desired Output:
"123 street Main Ave Apt 100","98765"
"312 Marco St,Some Ave \"Apt 3214\"","76543"
I want to achieve this using SQL in Oracle. Please help
Upvotes: 1
Views: 40
Reputation: 12440
Use REPLACE:
Select '"'||REPLACE(Address, '"', '\"')||'","'||zipcode||'"' from Address_table;
Upvotes: 1