Query Help - String in where clause has & character

筅森魡賤 提交于 2019-11-30 21:35:26

In TOAD, you can disable the prompt for substitution variables from the options dialog:

You need to uncheck: View –> Toad Options –> Execute/Compile –> Prompt for Substitution variables.

SET DEFINE OFF;

Will work to turn the prompting for variable off..

or

SET ESCAPE ON;
SELECT 'blah \& blah' AS DES FROM DUAL;

You can escape the ampersand character by using concatenation, like this:

select * from table 
where table_id in ('265' || '&' || '310', '266' || '&' || '320')
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!