Oracle query on String [duplicate]

我的未来我决定 提交于 2020-12-16 05:29:41

问题


I want to perform my query on a string in this format, xxxx/xxxx

where x is a number. when I perform it using the Oracle interface or my C# application I get this error:

ORA-00904: "xxxx/xxxx": invalid identifier

I performed this query:

SELECT * FROM "My Table" WHERE Field="xxxx/xxxx"

回答1:


You should use single quotes aroung SQL character literals like xxxx/xxxx:

SELECT * FROM "My Table" WHERE Field='xxxx/xxxx'


来源:https://stackoverflow.com/questions/3169193/oracle-query-on-string

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