Home » SQL & PL/SQL » SQL & PL/SQL » How to make package for this?
How to make package for this? [message #205704] Mon, 27 November 2006 03:22 Go to next message
karrisql.com
Messages: 7
Registered: November 2006
Junior Member
I have make a cursor, how can I make a package which include this cursor:
declare
ORA_ERR_NUMBER$ VARCHAR2(25);
ORA_ERR_MESG$ VARCHAR2(80);
ORA_ERR_ROWID$ VARCHAR2(10);

CURSOR ora_err_cur
IS
SELECT ORA_ERR_NUMBER$, ORA_ERR_MESG$, ORA_ERR_ROWID$
FROM invoice_tab;

BEGIN

OPEN ora_err_cur;
LOOP
FETCH bom_cur INTO
ORA_ERR_NUMBER$, ORA_ERR_MESG$, ORA_ERR_ROWID$;
EXIT WHEN bom_cur%NOTFOUND;
END LOOP;
CLOSE ora_err_cur;
Re: How to make package for this? [message #205712 is a reply to message #205704] Mon, 27 November 2006 03:51 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
At the risk of being pedantic, the thing that you posted isn't a cursor, it's an anonymous pl/sql block.

You could add the entire thing as a procedure in a package body by replacing the 'DECLARE' at the start with 'PROCEDURE procedure_name' and including it in an existing package body.
Previous Topic: Long raw to file
Next Topic: Binary Index and Btree Index
Goto Forum:
  


Current Time: Thu Dec 08 10:15:09 CST 2016

Total time taken to generate the page: 0.05087 seconds