I have PL/SQL function looking like:
FUNCTION get_agent_statistics ( id NUMBER
RETURN agent_stats_t
PIPELINED;
And I select from it (iBatis code):
SELECT * FROM table(pkg.get_agent_statistics(#id#))
How should I change this select if I'll remove PIPELINED statement from function?
When you remove
PIPELINEDclause from the function declaration, function ceases to be a PIPELINED table function and as a result you will have to modify the body of the function to convert it to a TABLE function, if you still want to use it thefromclause of the query, or a simple function, which you wont be able to use in thefromclause of a query.Addendum
Could I select something from non-pipelined function?Yes, if you have a TABLE function, otherwise no. Here is a couple of examples: