查询帮助-where子句中带有&的字符串特点 [英] Query Help - String in where clause has & character
问题描述
我正在运行这样的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子句中带有&的字符串特点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!