Executing a script (F5) results in a variable prompt when ampersand (&) is included in a comment.
/* Place an ampersand & here */
will prompt for variable ':here'
Oracle in general will prompt for value if it encounters a bind variable '&'.
Disable prompt for substitution variable in comments.
1. Go to View | Toad Options
2. From the left panel, select Execute/ Compile
3. Check appropriate check box under “Substitution Variable Prompting” section
This will only apply in Toad and will only apply when running as F9. If running as F5, it runs more similarly to SQL Plus/scripts so it will still prompt.
Add 'SET DEFINE OFF;' to beginning of script.
This applies to the current session and other script run. If you need to re-enable this, run 'SET DEFINE ON;' to re-enable for other scripts/statements.
Select 'Execute in QSR' instead of 'Execute script' and the script will run in Quest Script Runner.