Crystal report 9 / Oracle 9i/ ODBC Connection
I wrote this package and procedure in oracle 9i. It compile without any error but when i try to open this procedure from crystal report i am getting the error message. My question is can i use the temp table like i use in this procedure for crystal report or not. If not then what is the best way to do this. I need to have temp table so i can manipulate data like we do in SQL Server
PACKAGE CalllogPackage
AS TYPE CalllogType IS REF CURSOR;
end CalllogPackage;
procedure TestForTempTbl (
CalllogCursor IN OUT CalllogPackage.CalllogType)
as
l_tname varchar2(30) default 'temp_table_' || userenv('sessionid');
begin
execute immediate 'create global temporary table ' ||
l_tname || ' on commit delete rows
as
select * from tracker where 1=0 ';
execute immediate 'insert into ' || l_tname ||
' select * from tracker';
open CalllogCursor for
'select * from ' || l_tname || ' order by loginid';
execute immediate 'drop table ' || l_tname;
end;
I wrote this package and procedure in oracle 9i. It compile without any error but when i try to open this procedure from crystal report i am getting the error message. My question is can i use the temp table like i use in this procedure for crystal report or not. If not then what is the best way to do this. I need to have temp table so i can manipulate data like we do in SQL Server
PACKAGE CalllogPackage
AS TYPE CalllogType IS REF CURSOR;
end CalllogPackage;
procedure TestForTempTbl (
CalllogCursor IN OUT CalllogPackage.CalllogType)
as
l_tname varchar2(30) default 'temp_table_' || userenv('sessionid');
begin
execute immediate 'create global temporary table ' ||
l_tname || ' on commit delete rows
as
select * from tracker where 1=0 ';
execute immediate 'insert into ' || l_tname ||
' select * from tracker';
open CalllogCursor for
'select * from ' || l_tname || ' order by loginid';
execute immediate 'drop table ' || l_tname;
end;