What is the problem with this stored procedure?
From: Wallace <princevictor.moses_at_gmail.com>
Date: 11 May 2006 00:25:45 -0700
Message-ID: <1147332345.314376.297250_at_j33g2000cwa.googlegroups.com>
[Quoted] Hai All,
Date: 11 May 2006 00:25:45 -0700
Message-ID: <1147332345.314376.297250_at_j33g2000cwa.googlegroups.com>
[Quoted] Hai All,
Can anyone point out what is problem with this following stored procedure :
CREATE OR REPLACE PROCEDURE PRINCE.PROC_EMP AS
DECLARE
TYPE collectionset IS TABLE OF Employee%ROWTYPE;
collections collectionset;
BEGIN
SELECT * BULK COLLECT INTO collections FROM Employee;
FOR i IN collections.FIRST .. collections.LAST
LOOP
DBMS_OUTPUT.PUT_LINE(collections(i).ID);
END LOOP;
END;
when i compile i am getting the following errors:
- Error(2,1): PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following: begin function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> form current cursor external language The symbol "begin" was substituted for "DECLARE" to continue.
- Error(11,4): PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
I am new to OracleXE... Please help...
looking forward for the response... Received on Thu May 11 2006 - 09:25:45 CEST