In order to create a stored procedure query subject in framework manager you have to create a stored procedure which returning a reference ref_cursor for the result set.Here i giving the code sample
step1
create a package with one reference cursor
create or replace package pkg_ref_cursor
as
type ref_cursor is ref cursor;
end;
/
step2
create a procedure to actually do the task and return the result set
create or replace procedure tfp.getData( p_ref_cursor in out pkg_ref_cursor.ref_cursor,text in varchar2)
as
Begin
-- some code
insert into tfp.tempTable select sysdate,text from DUAL;
-- the result set to return
open p_ref_cursor for SELECT * from TFP.tempTable;
end;
/
step3
now you can directly import this procedure in framework manager and use for creating reports
similar as a table or view
step1
create a package with one reference cursor
create or replace package pkg_ref_cursor
as
type ref_cursor is ref cursor;
end;
/
step2
create a procedure to actually do the task and return the result set
create or replace procedure tfp.getData( p_ref_cursor in out pkg_ref_cursor.ref_cursor,text in varchar2)
as
Begin
-- some code
insert into tfp.tempTable select sysdate,text from DUAL;
-- the result set to return
open p_ref_cursor for SELECT * from TFP.tempTable;
end;
/
step3
now you can directly import this procedure in framework manager and use for creating reports
similar as a table or view
No comments:
Post a Comment