You cannot bind a table name :AI_TABLE during embedded SQL execution, you will need to use dynamic PL / SQL; or in Apex, create a report area of ββthe SQL Query (PL/SQL function body returning SQL query) type SQL Query (PL/SQL function body returning SQL query) :
RETURN 'SELECT * FROM '|| :AI_TABLE || ' a WHERE a.ERROR_TEXT = ' || :AI_ERROR;
source share