I need to return from table function string like inside ref cursor;
create or replace
FUNCTION get_data(QUERY in VARCHAR2)
RETURN [SOMETHING] pipelined
is
ret sys_refcursor;
BEGIN
open ret for QUERY;
Loop
fetch ret into [SOMETHING];
exit when ret%notfound;
pipe row(str);
end loop;
close ret;
END get_data;
Any idea, how I can return type like ret%rowtype.
select .. from any_table, without invoking theget_data()function, which according to your example does nothing but returns result of a query without transformation. Why would you even need that function? - Nick Krasnovret) returns. So, it basically rules out the possibility to passselect .. from any_tablein to that function. - Nick Krasnovanydatasetspecifically. Here is an example. - Nick Krasnov