Recently I've had to run a fairly large .sql
file that installed a PL/SQL package. There were a number of ampersand (&) characters used throughout the file which were not meant for use as substitution values but SQLDeveloper
was still tricked into asking for a substitute to be entered. Luckily, there was an easy way to stop this from happening.
As a simple example if I try to run a SQL statement - "select 'Apples & Banans' as fruit from dual;
will do this...
Not really what is wanted! SQLDeveloper
understands the SET DEFINE
command as used in SQLPlus
. So setting this value to OFF
will disable value substitution. Easy!
The command is run like a normal SQL
statement, After that, no more substitution is performed, the prompts go away and the ampersands behave as regular characters. This is only needed to be run once for a session too, so no need to keep running it as long as you're using the same connection/session.
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...