Using lexical parameter in where clause of a sql in PL/SQL block in oracle
Hello,
I have a report parameter P_WHERE_CLAUSE which has value set either as ' AND 1=1 ' or ' AND sal = 100 '
I can use the above variable in Data Model sql of the report by adding &P_WHERE_CLAUSE.
I want to use the same lexical parameter in a select where clause that I have in a Pl/sql program unit of the report (e.g AfterReport trigger). It does not accept &P_WHERE_CLAUSE or :P_WHERE_CLAUSE.
Any idea how this can be done?