Skip to Main Content

SQL Developer for VS Code

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue with substitution variables

Peter Nguyen32 hours ago — edited 28 hours ago

Hi,

I have the following code:

Executing this code via Run Scripts asks for a value for spooldestination, even though there's a column declaration. This code does execute as intended in the old Oracle SQL Developer.

UPDATE - actual code:

DEFINE release_number = "'SAHA10405'"
WHENEVER SQLERROR EXIT 1
SET serveroutput ON SIZE unlimited echo OFF LINESIZE 32767 PAGES 200 TRIMSPOOL ON TRIMOUT OFF WRAP OFF FEEDBACK OFF VERIFY OFF
column spool_destination noprint new_value spooldestination
SELECT &release_number||'_'||sys_context('userenv','instance_name')||'_'
||to_char(SYSDATE,'YYYYMMDD"T"HH24MISS')||'.log' AS spool_destination
FROM dual;
spool &spooldestination
SET DEFINE OFF FEEDBACK ON

Comments
Post Details
Added 32 hours ago
2 comments
38 views