Query Help - String in where clause has amp; character(查询帮助 - where 子句中的字符串有 amp;特点)
问题描述
我正在运行这样的 SQL (Oracle) 语句
I am running an SQL (Oracle) statement like that
select * from table
where table_id in ('265&310', '266&320')
在运行 TOAD 时,它会将 & 视为某个变量占位符并询问其值.如果是 1-2 个占位符,那么我可以在 TOAD 中设置它,但 in 子句有 200 个字符串.
While running through TOAD, it consider & as some variable placeholder and it asks for its value. If it was for 1-2 place holders then I could have set it in TOAD but the in clause has like 200 of strings.
这个查询怎么写?
我想将 DATASET 导出为 SQL INSERT 语句,所以我不能在 SQL-PLUS 中使用它.
I want to export the DATASET as SQL INSERT statement, so I can't use this in SQL-PLUS.
推荐答案
在 TOAD 中,您可以从选项对话框中禁用替换变量的提示:
In TOAD, you can disable the prompt for substitution variables from the options dialog:
您需要取消选中:查看 –> Toad 选项 –> 执行/编译 –> 提示替换变量.
You need to uncheck: View –> Toad Options –> Execute/Compile –> Prompt for Substitution variables.
这篇关于查询帮助 - where 子句中的字符串有 &特点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:查询帮助 - where 子句中的字符串有 &特点


基础教程推荐
- 带更新的 sqlite CTE 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01