Home > Software design >  Substitution variable && not working in SQLcl
Substitution variable && not working in SQLcl

Time:05-12

The "new" tool Oracle SQLcl is not interpreting "&&" correctly. Is there an option to correct this behavior?


Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Last Successful login time: Tue May 10 2022 18:17:49 -04:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.15.0.1.0

SQL> def var=99
SQL> prompt &var &&var
99 &99

The expected answer would be: (using sqlplus)

SQL> def var=99
SQL> prompt &var &&var
99 99

CodePudding user response:

It's a bug.

You should log bugs to My Oracle Support, but I'll handle this one for you.

SQLcl debuted in 2014. Not sure if that's "new" or new.

Workaround: go download version 21.4 - I've confirmed it's working as expected there.

enter image description here

  • Related