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 prefix = "app"
-- create procedure using a substition variable (no syntax error in VS Code)
create or replace package &&prefix._pkg is end;
/
-- create context using a substitution variable (syntax error in VS Code)
create or replace context &&prefix._ctx using &&prefix._pkg;
Here's the screenshot showing the complete error message:
