Wednesday, March 7, 2012

Report based on temporary table

Hi
I need to create a report based on temporary table in oracle, table does not exist until stored procedure is executed. i am outputing a ref cursor but it shows no fields when i am creating the report.
help needed.
Regards
S RaheemEnter the correct values for which stored procedure will take|||hi am doing something like this

PROCEDURE Missing_Document(d IN OUT docs)
IS
BEGIN
EXECUTE IMMEDIATE 'create global temporary table testing(name varchar2(30))';
EXECUTE IMMEDIATE 'insert into testing values(''dddd'')';
EXECUTE IMMEDIATE 'insert into testing values(''eeee'')';
EXECUTE IMMEDIATE 'insert into testing values(''fffffff'')';
OPEN d FOR 'select * from testing';
END Missing_Document;

docs is a ref cursor|||hi am doing something like this

PROCEDURE Missing_Document(d IN OUT docs)
IS
BEGIN
EXECUTE IMMEDIATE 'create global temporary table testing(name varchar2(30))';
EXECUTE IMMEDIATE 'insert into testing values(''dddd'')';
EXECUTE IMMEDIATE 'insert into testing values(''eeee'')';
EXECUTE IMMEDIATE 'insert into testing values(''fffffff'')';
OPEN d FOR 'select * from testing';
END Missing_Document;

docs is a ref cursor

I got it working now thanks all, but i got a new error in oracle temp tables..

No comments:

Post a Comment