I am writing a stored procedure which uses a SYNONYM of a VIEW with a database link that is giving me a "PLS-00201: identifier 'IALIS_VIEW_FCCS' must be declared" error message when I try to compile it. However, if I use the explicit name it compiles. Even more mysterious, both versions work just fine in stand-alone SELECT staements! Is there some limitation to SYNONYMS that I am unaware of, and is there a way to make it use the SYNONYM?
More specifically,
IALIS_VIEW_FCCS is a synonym of ialis.viw_receipt@RCPItoFCCS. This
and
work fine but only
compiles. Using the synomym in cursor alis_cur returns an "indentified must be declared" error.
More specifically,
IALIS_VIEW_FCCS is a synonym of ialis.viw_receipt@RCPItoFCCS. This
Code:
select count(*) from ialis_view_fccs;
Code:
select count(*) from ialis.viw_receipt@RCPItoFCCS;
Code:
CURSOR alis_cur
IS
SELECT DISTINCT ALIS.payment_invoice_id,
ALIS.trans_auth_date_time,
ALIS.confirmation_number,
ALIS.total_ticket_amt
FROM ialis.viw_receipt@RCPItoFCCS ALIS
WHERE alis.payment_status IN('A', 'E')
AND alis.trans_auth_date_time < SYSDATE - 2
AND alis.dfs_receipt_number IS NULL;