Search notes:

ORA-43907: This argument must be a literal or bind variable.

Setting cursor_sharing to force causes to_number( … on conversion error) to throw an ORA-43907: This argument must be a literal or bind variable error:
alter session set cursor_sharing = force;

select to_number(1 default -1 on conversion error) from dual;
With the cursor_sharing_exact hint, the error goes away.
select /*+ cursor_sharing_exact */ to_number(1 default -1 on conversion error) from dual;
Or alternatively, set cursor_sharing to exact:
alter session set cursor_sharing = exact;

select to_number(1 default -1 on conversion error) from dual;

See also

ORA-43918: This argument must be a literal
Other Oracle error messages

Index