plsql - Retrieving a resultset through an oracle procedure -
i have limited skill on pl-sql , have complicated situation.
in mssql have procedure returns result set varying number of columns varying source tables depending on parameters provided.
in oracle having difficulty create proc same.
i need generate query inside, execute , return result.
i searched lot , tried lot of things. best way execute query cursor can not manage do. can generate query , execute - , have no visible result.
any ?
thanks
edit: being more specific: how can execute dynamically generated query cursor or reutn local temporary table ?
something this?
create or replace procedure dynamic_cursor_demo ( p_some_expression in varchar2 , p_results out sys_refcursor ) begin open p_results 'select ' || p_some_expression || ' demo dual'; end dynamic_cursor_demo;
(if have oracle 12c can use implicit statement results. examples in docs.)
Comments
Post a Comment