October 2005
Intermediate to advanced
454 pages
14h 44m
English
Because table functions return collections, there is no easy way to declare strongly typed REF cursors to handle them when nesting. Thus, I have to declare records with the same structure as the collection and then tie a REF cursor to them like this.
CREATE OR REPLACE PACKAGE cursors
TYPE v_number_rec IS RECORD ( number_col NUMBER );
TYPE number_curs IS REF CURSOR RETURN v_number_rec;
END;Now the strongly typed REF cursor can be used in table functions ready for nesting.
CREATE OR REPLACE FUNCTION nested_number ( p_curs cursors.number_curs )...