I created a temporary table and a stored function to read it. when i call it following message appears:
RA-22905: Zugriff auf Zeilen eines Objekts, das keine Nested Table ist, nicht möglich
22905. 00000 - "cannot access rows from a non-nested table item"
*Cause: attempt to access rows of an item whose type is not known at
parse time or that is not of a nested table type
*Action: use CAST to cast the item to a nested table type
Fehler in Zeile: 3 Spalte: 15
So, how can I do that CAST thing?
My beloved function:
create or replace PACKAGE BODY testlho2 IS
FUNCTION getBasicDate (app_in IN varchar2, termc_in IN varchar2)
return sys_refcursor is
l_rc SYS_REFCURSOR;
BEGIN
-- Populate temporary table
INSERT INTO temp_tab_test_lho2 (app, sla, tsl)
SELECT app, sla, tslstat
FROM pmon_orig_file
WHERE app = app_in and termcause = termc_in;
-- Open REF CURSOR for Output
open l_rc for
select app, sla, tsl
from temp_tab_test_lho2;
return l_rc;
END;
END testlho2 ;