report error: ORA-01008: not all variables bound
723301Sep 22 2009 — edited Sep 22 2009Hi,
I ma trying to run the following query as a report in APEX application:
select * from table(convertsqlstmt2table('SELECT DynamicObject(trans.user_sess_audt_txn_id, trans.isrt_tmstmp, trans.start_txn_tmstmp, trans.lst_txn_tmstmp)
FROM user_sess_audt_txn trans,
(SELECT DISTINCT user_sess_audt_txn_id
FROM user_audt_txn_obj_log
WHERE LOWER(own_ref) = LOWER(DECODE(:P1_OWNER_NM, NULL, own_ref, :P1_OWNER_NM))
AND LOWER(obj_nm) = LOWER(DECODE(:P1_TABLE_NM, NULL, obj_nm, :P1_TABLE_NM))
) trans_obj'));
Function convertsqlstmt2table(sql_stmt VARCHAR2) returns results of my query, passed as a string, as a table object. Probably there is some problem with :P1_OWNER_NM and :P1_TABLE_NM variables passed from APEX from text fields. In my case this fields are empty as I want to get maximum of records.
I am getting ORA-01008: not all variables bound.
Could you please advice?
Regards,
Beny