Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: procedure creation problem

Re: procedure creation problem

From: Martin Haltmayer <Martin.Haltmayer_at_0800-einwahl.de>
Date: Tue, 12 Jun 2001 22:44:04 +0200
Message-ID: <3B267F14.B4C31BF@0800-einwahl.de>

Use sys.v_$session instead of v$session. What gives?

Martin

Peter Shankey wrote:
>
> 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 Tue Jun 12 2001 - 15:44:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US