Toad (15.1.113.1379) displays a syntax error for following code:
declare
i varchar2(2000);
begin
i := 'a';
i := i || q'[]'; --this line is the problem, exactly the q'[]'
i := i || '';
dbms_output.put_line(i);
end;
The execution works fine, but Toad interprets this code as buggy. Also, when used in packages, procedures are truncated in the package tree of the shema browser.
Every procedure/function after the block with q'' is missing in package tree, as you can see in the screenshot (procedure test2 is missing in package-body-tree)
CREATE OR REPLACE PACKAGE testpkg
AS
PROCEDURE test;
PROCEDURE test2;
END;
/
CREATE OR REPLACE PACKAGE BODY testpkg
AS
PROCEDURE test
AS
i VARCHAR2 (2000);
BEGIN
i := 'a';
i := i || q'[]'; --this line is the problem
i := i || '';
DBMS_OUTPUT.put_line (i);
END;
PROCEDURE test2
AS
i VARCHAR2 (2000);
BEGIN
i := 'a';
DBMS_OUTPUT.put_line (i);
END;
END;
/