Use of GTT in BI Publisher datamodel
Since I have very complicated business logic to create a dataset for BI Publisher report I want to use GTT (Global Temporary Table). Instead of one giant SQL query I want to populate GTT table and then return refcursor to BI Publisher datamodel.
This scenario is also recomended in Oracle documentation but I can't make it work. There is mentioned exactly the same solution but without example :/
"Anonymous blocks/Stored procedures
BI Publisher supports executing PL/SQL anonymous blocks. You can write DML or DDL commands, populate temp tables, or perform calculations in the PL/SQL block and return the result set. BI Publisher uses callable statements to execute anonymous blocks."