Alternativ 1 Skapa funktion för att returnera stark ref-markör.
create or replace function getCursor return refcur_pkg.refcur_t is
c_tmp refcur_pkg.refcur_t;
begin
open c_tmp for select * from StockTable;
return c_tmp;
end;
SELECT * FROM TABLE(StockPivot(getCursor()));
Alternativ 2. Du kan prova marköruttryck det borde också fungera. Marköruttryck .
SELECT * FROM TABLE(StockPivot(Cursor(select * from StockTable)));