We need to implement request rewriting using a variable binding, because we do not have the ability to modify the source code of the web application. Example:
BEGIN SYS.DBMS_ADVANCED_REWRITE.declare_rewrite_equivalence ( name => 'test_rewrite2', source_stmt => 'select COUNT(*) from ViewX where columnA = :1', destination_stmt => 'select COUNT(*) from ViewY where columnA = :1', validate => FALSE, rewrite_mode => 'recursive'); END;
The above command will fail because there is a bind variable:
30353. 00000 - "expression not supported for query rewrite" *Cause: The SELECT clause referenced UID, USER, ROWNUM, SYSDATE, CURRENT_TIMESTAMP, MAXVALUE, a sequence number, a bind variable, correlation variable, a set result, a trigger return variable, a parallel table queue column, collection iterator, a non-deterministic date format token RR, etc. *Action: Remove the offending expression or disable the REWRITE option on the materialized view.
I read here that there is work, but I just cannot find the document anywhere on the Internet.
Could you tell me what work is?
source share