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!

Substitution variables only resolve when DEFINE and usage are executed together

Samo Kojc2 days ago

Hi,

I’m seeing unexpected behavior with substitution variables in SQL Developer for VS Code.

Substitution variables work only if DEFINE and usage occur in the same execution.
If I run them in separate executions, the variable exists (shown by DEFINE;)
but substitution still triggers a prompt dialog.

Example:

Run #1:
set define ~;
define s='C:\Scripts';

Run #2:
prompt 's = ~s';

This opens a substitution prompt, even though DEFINE; shows variable S.

The same applies when variables are defined in an included script (@file.sql):
they appear in DEFINE; output but are not resolved during substitution.

This works as expected in SQLcl / SQL*Plus.

Is this a known limitation or a bug?
Should substitution variables be expected to persist across executions?

Thanks.

Comments
Post Details
Added 2 days ago
0 comments
31 views