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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -