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.
A quick disclaimer...
Although I put in a great effort into researching all the topics I cover, mistakes can happen.
If you spot something out of place, please do let me know.
All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle).
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...