Scan defines/substitutions does not work correctly with &&

define test_var=to_date(‘9999-12-31 00:00:00’,‘yyyy-mm-dd hh24:mi:ss’);
select &&test_var from dual;

Spool output:
**** SCRIPT STARTED 2009-02-10 12:28:12 ****
select &&test_var from dual
==>
&test_var=to_date
ORA-00904: “TO_DATE”: ungültiger Bezeichner
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
**** SCRIPT ENDED 2009-02-10 12:28:12 ****
=>Not OK

define test_var=‘Text’;
select &&test_var from dual;
=>Not OK

define test_var=123;
select &&test_var from dual;
=>OK

If you use “select &test_var from dual;” all these test_var above work correctly.

Please help me to solve this problem.

Chris

Hi Chris,

It’s a known issue of Nav that it doesn’t recognize the To_date syntax in a define statement. This will be fixed shortly.

For the second script, it would work with && if the script is either:
define test_var=‘Text’;
select ‘&&test_var’ from dual;
OR
define test_var=Text;
select ‘&&test_var’ from dual;

Cheers,
Gwen

Thank you. I’m waiting for next release,

Chris