BI Publisher (MOSC)

MOSC Banner

Error using anonymous block using refcursor in BIP data model

edited Feb 3, 2020 4:02AM in BI Publisher (MOSC) 4 commentsAnswered

I am trying to implement below code to get table name which is generated dynamically.

DECLARE

   TYPE REFCURSOR IS REF CURSOR;

   XDO_CURSOR REFCURSOR;

BEGIN

  OPEN :XDO_CURSOR FOR

SELECT FA_WHATIF_DEPRN_PKG.GET_WHATIF_TABLE_NAME(P_REQUEST_ID => :P_REQ_ID)

FROM DUAL;

COMMIT;

END;

this code works independently and provides output but when i use XDO_CURSOR in from clasue of another data set with DM it shows following error:

SELECT T.REQUEST_ID

FROM &L_FA_WHATIF_REP_T T

oracle.xdo.servlet.data.DataException: oracle.xdo.servlet.data.DataException: oracle.xdo.servlet.data.DataException: oracle.xdo.XDOException: java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center