Select '"'||Address||'","'||zipcode||'"' from Address_table;
输出:
"123 Main St Ave Apt 100","98765" -- Good Data
"312 Marco St Some Ave "Apt 3214"","76543" -- Bad Data
期望的输出:
"123 street Main Ave Apt 100","98765"
"312 Marco St,Some Ave \"Apt 3214\"","76543"
我想在Oracle中使用SQL实现此目的。请帮忙
答案 0 :(得分:1)
使用REPLACE:
Select '"'||REPLACE(Address, '"', '\"')||'","'||zipcode||'"' from Address_table;