Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> procedure creation problem
When I try to create a procedure
set serveroutput on
create or replace procedure AddCrrnt AS
v username varchar2(30);
v sid number;
v serial# number;
CURSOR c vsession IS
select USERNAME,SID,SERIAL# from v$session
where USERNAME is NOT NULL;
BEGIN
OPEN c vsession;
LOOP
FETCH c vsession INTO v username, v sid, v serial#;
EXIT WHEN c vsession%NOTFOUND;
END LOOP;
END AddCrrnt;
/
the show errors gives me:
11/12 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
11/38 PLS-00201: identifier 'SYS.V $SESSION' must be declared
How can I declare a cursor on v$session and how do I declare it.
thanks
pete
Received on Fri Jun 08 2001 - 13:40:29 CDT