Just following this up myself. I have got the following to work. However if there are any Oracle DBA's out there who have a better solution I am all ears.
create or replace package donovan.ApoloPk is
type rcursor_type is ref cursor;
end;
/
create or replace procedure donovan.reportx2(MyCursor in out ApoloPk.rcursor_type)
is
begin
open MyCursor for SELECT * FROM "DONOVAN"."tblCountries";
end reportx2;
/
At 14:00 02/08/2001 +1000, you wrote:
G'Day,
My apologies for posting a DB question here, but I am desperate and am sure someone can point on the enlightened path. I need to do some work in Oracle 8i. I have experience with most other DBMS's but never with Oracle. I am trying to do something so simple that I just cannot believe I cannot figure it out. All I want to do is create a stored procdedure on the Oracle box.
To do this in MS-SQL 2K I would:
- Open Query Analyzer
- Change to the DB I wanted to place it in
- Exec the following T-SQL
CREATE PROCEDURE [dbo].[sp_Test2]
AS
-- Add the information to the table
SELECT * FROM tblCountries
GO
- How do I do this Oracle?
- What tool(s) do I use?
I have tried permuatations of the following in SQL+/Worksheet and just keep getting errors:
CREATE or REPLACE PROCEDURE sp_Test IS
BEGIN
SELECT * FROM "DONOVAN"."tblCountries";
END;
Warning: Procedure created with compilation errors.
Can someone please give me the simple push I need?
TIA
-- Donovan
----------------------------------------------------------------------
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems [www.namsys.com.au]
Voice: +61 2 6285-3460
Fax: +61 2 6285-3459
TVisualBasic = Class(None);
Heard just before the 'Big Bang': "...Uh Oh...."
----------------------------------------------------------------------
GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer
replacement. Also includes freeware delphi windows explorer components.
----------------------------------------------------------------------
----------------------------------------------------------------------
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems [www.namsys.com.au]
Voice: +61 2 6285-3460
Fax: +61 2 6285-3459
TVisualBasic = Class(None);
Heard just before the 'Big Bang': "...Uh Oh...."
----------------------------------------------------------------------
GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer
replacement. Also includes freeware delphi windows explorer components.
----------------------------------------------------------------------