2 Replies Latest reply on Dec 9, 2015 1:04 PM by thatJeffSmith-Oracle

    [SQLcl: Release 4.2.0.15.295.1605] REPEAT command does not process substitution variables

    RJLyders

      (I didn't see a forum for SQLcl specifically, so please forgive me if this is not the correct place for this post)


      I was excited when I realized that the REPEAT command might help me solve a requirement in SQLcl, but disappointed to find that substitution variables are not being processed by the REPEAT command.

       

      Please see the following tests executed manually in SQLcl that work as expected:

      SQL> select '&test' test from dual

      Enter value for test foo

      old:select '&test' test from dual

      new:select 'foo' test from dual

       

      TES

      ---

      foo

       

      SQL> select '&test' test from dual

      Enter value for test bar

      old:select '&test' test from dual

      new:select 'bar' test from dual

       

      TES

      ---

      bar

       

      Note that each time I am asked for a value for substitution variable '&test'.

       

      However, when I run the REPEAT command to re-execute the above SQL:

      Running 2 of 2 @ 0:2:40 with a delay of 1.0s

      TEST

      &test

       

      As you can see in the above results...

      1. The user is never prompted to enter a value for the '&test' substitution variable.
      2. The literal text '&test' is shown as opposed to the last value of '&test'.
      3. When I use a single '&' as in '&test' I would expect that it would ask for a value each time. If I were to use '&&test' I would expect for each execution to just re-use the last value of the substitution variable.


      PS: I love these new tools and only report these issues because I am eager to make use of all the new features. :-)