Parameters

Hello all, long time user, first time poster.
We have recently upgraded to toad for oracle 10.0.0.41.
Some nice new features and some changes one of which is how parameters are handled.
I have a query that has multiple sub queries that use a single input parameter called DTI_MODNAME whihc i format as ‘&DTI_MODNAME’.
In previous versions of toad, when the query was ran i was asked once for the parameter because all of th sub queries called the same parameter name.
In the new version of toad the parameter window has a list of 20 parameters, all with the same name with a (x) appended to the end of the parameter name. i have figured out that you only have to change one to change them all but this only happens in the second run. for example,
If one of the same named parameters was set to A and run i get 9 records.
If one of the same named parameters was now set to B and run i still get 9 records.
If one of the same named parameters was left as B and run i now get 11 records.
If one of the same named parameters was set back to B and run i still get 11 records.
If one of the same named parameters was left as A and run i now get 9 records.
2 questions

  1. Why does the input parameters list the same input parameter 20 times.
  2. why does toad ignore my first change of the parameters.
    hope this post makes sense.

There is a difference between & and && variable notation.

SELECT &var FROM table WHERE col = ‘&var’; // This will
prompt for VAR twice as expected

SELECT &&var FROM table WHERE col = ‘&&var’; // This
will prompt for VAR once as expected

There is documentation out there for substitution variables that explain this
well.

Also you should use the latest available patch, 10.1.0. A second patch, 10.1.1,
will be available very soon.

Michael