Search notes:

ORA-64630: unsupported use of SQL macro

ORA-64630: unsupported use of SQL macro: use of nested scalar SQL macro is not supported

A scalar SQL macros cannot be used as part of the expression given to another SQL macro.
create or replace function tq84_macro(expr varchar2) return varchar2 sql_macro(scalar) is begin
   return 'substr(expr, 2)';
end tq84_macro;
/
This SQL statement runs fine:
select
   object_name,
   tq84_macro(object_name) o2
from
   user_objects;
This statement throws ORA-64630: unsupported use of SQL macro: use of nested scalar SQL macro is not supported:
select
   object_name,
   tq84_macro(tq84_macro(object_name)) o3
from
   user_objects;
Calling a scalar macro from within another scalar macro, however, is possible:
create or replace function tq84_macro_wrap(expr varchar2) return varchar2 sql_macro(scalar) is begin
   return 'tq84_macro(expr)';
end tq84_macro_wrap;
/

select
   object_name,
   tq84_macro_wrap(object_name) ow
from
   user_objects;
drop function tq84_macro_wrap;
drop function tq84_macro;

See also

Other Oracle error messages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758207229, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-64630_unsupported-use-of-SQL-macro(78): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78