Having a weird issue with the Oracle Dev Tools Extension for VS Code. The "/" (slash) symbol breaks if there's an uneven number of quotes in the block. It works fine in SQL Developer but with the VS Code extension it returns with Encountered the symbol "/"
This compiles just fine...
CREATE OR REPLACE PACKAGE CUSTOMER_PKG AS
PROCEDURE ADDCUSTOMER(
P_FIRST_NAME IN VARCHAR2 -- Customer's first name
,P_LAST_NAME IN VARCHAR2 -- Customer's last name
);
END CUSTOMER_PKG;
/
CREATE OR REPLACE PACKAGE BODY CUSTOMER_PKG AS
PROCEDURE ADDCUSTOMER(
P_FIRST_NAME IN VARCHAR2 -- Customer's first name
,P_LAST_NAME IN VARCHAR2 -- Customer's last name
) AS
BEGIN
NULL;
END ADDCUSTOMER;
END CUSTOMER_PKG;
/
But this returns with PLS-00103: Encountered the symbol "/"
CREATE OR REPLACE PACKAGE CUSTOMER_PKG AS
PROCEDURE ADDCUSTOMER(
P_FIRST_NAME IN VARCHAR2 -- Customer's first name
,P_LAST_NAME IN VARCHAR2 -- Customers last name
);
END CUSTOMER_PKG;
/
CREATE OR REPLACE PACKAGE BODY CUSTOMER_PKG AS
PROCEDURE ADDCUSTOMER(
P_FIRST_NAME IN VARCHAR2 -- Customer's first name
,P_LAST_NAME IN VARCHAR2 -- Customers last name
) AS
BEGIN
NULL;
END ADDCUSTOMER;
END CUSTOMER_PKG;
/
Here's another example...
This works:
SELECT * FROM DUAL -- '
This works:
SELECT * FROM DUAL -- ''
/
This doesn't:
SELECT * FROM DUAL -- '
/
Keep in mind ALL examples run in SQL Developer without an issue... I need Oracle Dev Tools to compile like Oracle SQL Developer does as this is what our codebase is built off of.
this is a major blocker as it's very common in our codebase to combine the spec and body into the same file using "/" to separate the two... and these often contain (an uneven number of) quotes within the comments...
I've been digging through the SQL*PLUS config settings to see if there's some setting to fix this but haven't found anything yet...
I posted this as a bug report in the Q&A on the visual studio marketplace. Oracle responded by saying this will be fixed in the next release (21.8) available later this month.
You can see this here: https://marketplace.visualstudio.com/items?itemName=Oracle.oracledevtools&ssr=false#qna