Editor does not allow entering a value for variable &1 (ampersand-one)

Execute line at caret and execute as script both popup a Variable window with all input boxes greyed out
(this is also a problem in 12.9 GA)

SELECT ‘&1’ FROM dual;

I never got a reply to this but it is still a problem for me in 12.10 GA. Any help would be appreciated.

Sorry, I guess I missed this one.

In the Editor - right-click, choose “Substitution Variable Prompting” and set it to “All”

That did not help. I usually have it set to “Ignore those in comments” but tried All. It just happens for &1. If I change it to &2, works fine with either setting.

Also happens for statements without single quotes such as

ALTER SESSION SET CURRENT_SCHEMA=&1;

Luckily, I have a copy of your user files folder and was able to reproduce it. It seems that ‘1’ was once used as an output variable, and Toad remembered that, and since it remembers past variables, it thinks that this is an output variable and that’s why everything the value box disabled.

To fix it, do this:

SELECT :1 FROM dual;

Run it and when the variable dialog comes up, change it to an input variable and click OK. After that, “SELECT ‘&1’ FROM dual” will work again.

I’ll fix this so substitution variables are always treated as input.

Some more great detective work - thanks. Your solution fixed my problem…