Escape double quote in sybase

守給你的承諾、 提交于 2019-12-12 03:56:46

问题


I am running a query on a database to retrieve records in a CSV (with quotes) format:

"Data","More data","some "funny" data with quotes","more".

Now when this is parsed, there is an obvious problem with this bit:

...,"some "funny" data with quotes",...

Is there a way to "escape" these quotes in sybase to save me post-processing?


回答1:


if it's just double-quote you want to select in a literal string, use single quote as the string's delimiter.

Try select '"' and you'll see




回答2:


--after you execute this sentence: SET QUOTED_IDENTIFIER ON

--you will be able to execute: select count(*) from "/table/name" go



来源:https://stackoverflow.com/questions/16019007/escape-double-quote-in-sybase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!