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!

Bug: Syntax Error When Using a Substitution Variable in SET Command

Philipp SalvisbergDec 15 2024 — edited Dec 15 2024

The next script can be saved, e.g., as “test.sql,” and successfully executed via SQLcl or SQL*Plus. It also works via “Run Script (F5)” in VS Code. However, it produces a syntax error in the VS Code extension 24.3.1.

-- set substituation variable
define linesize = 50

-- use substitution variable in select statement (no syntax error in VS Code)
select &&linesize
 where &&linesize > 10;

-- use substitution variable in set command (syntax error in VS Code)
set linesize &&linesize

Here's the screenshot showing the complete error message:

Comments
Post Details
Added on Dec 15 2024
3 comments
257 views