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!

Incorrect message when calling sql_macro in the WITH clause

Monika LewandowskaFeb 25 2026 — edited Feb 25 2026

Incorrect message when calling sql_macro in the WITH clause

Scirpt:

create or replace function gen_rows (pnRows number default 1) return varchar2
sql_macro (table)
is
begin
return q'[select level lvl from dual connect by level <=pnrows]';
end;
/

with q as
 (select * from gen_rows(10))
select *
from jobs j,  q;

Proper message after executin above query (SQLplus, SQLcl):

ORA-64630: unsupported use of SQL macro: use of SQL macro inside WITH clause is
not supported      

messagein VS Code, when you execute query as a query :)

{
   "env": {
       "defaultTimeZone": "Z"
   },
   "items": []
}

If you execute query as a script, there is a proper message

SQL Error: ORA-64630: unsupported use of SQL macro: use of SQL macro inside WITH clause is not supported
This post has been answered by thatJeffSmith-Oracle on Feb 25 2026
Jump to Answer
Comments
Post Details
Added on Feb 25 2026
1 comment
63 views