Home » RDBMS Server » Server Administration » return a recordset from oracle function
return a recordset from oracle function [message #374363] Thu, 07 June 2001 23:51 Go to next message
barun
Messages: 3
Registered: June 2001
Location: india
Junior Member
hi,
I used to write complex stored procedures in SQL Server which would return a recordset to Crystal Reports to generate the report. Can I do the same in Oralce ?
For example :
In SQL Server the following SP will return a recordset.

Exec ('Select * from emp')

is it possible in Oralce.
Someone please.

Thanks in advance.
Re: return a recordset from oracle function [message #374372 is a reply to message #374363] Fri, 08 June 2001 08:57 Go to previous messageGo to next message
yushuai
Messages: 5
Registered: December 2000
Junior Member
Try as follows:
step1:
sql>create or replace package pkg_test
is
type rc is Ref cursor Return emp%rowtype;
end;
/
sql>create or replace procedure proc_test
(parm1 in char,
rst in out pkg_test.rc)
is
begin
open rst for
select * from emp;
end;
/
sql>
still getting errors [message #374410 is a reply to message #374363] Mon, 11 June 2001 01:55 Go to previous message
barun
Messages: 3
Registered: June 2001
Location: india
Junior Member
hi yushuai,
thanx for the code. but i m getting error while executing the code sent by u. it's giving a message : -
'Warning: Package created with compilation errors.'
could u pls help ?

sorry to bother u again.

barun k das.
Previous Topic: query
Next Topic: export and import all database
Goto Forum:
  


Current Time: Mon Jul 01 03:58:44 CDT 2024