VSCode 1.74.2
Oracle Developer Tools for VS Code 21.5.0
Windows 11
OracleDb 19c
There appears to either be a bug in how either the extension or the ODP.NET provider handles comments that contain a semicolon ";" The following two code snippets demonstrates the bug.
******************************
SQL Code #1 generates an error
WITH
params AS (
SELECT '' placeholder
,'I am the author' author
FROM dual
) -- SELECT * FROM params pp;
SELECT * FROM params pp;
******************************************
SQL Code #2 DOES NOT generate an error
WITH
params AS (
SELECT '' placeholder
,'I am the author' author
FROM dual
) -- SELECT * FROM params pp
SELECT * FROM params pp;
****************************************
The only difference between 1 & 2 above is 1 contains a semicolon at the end of the single line comment.
Generates an error:
-- SELECT * FROM params pp;
DOES NOT generate an error:
-- SELECT * FROM params pp
The error generated is the following:
ERROR at line 1:
ORA-00928: missing SELECT keyword