Re: PS/SQL Procedure

From: Jens <jens_at_faeustl.de>
Date: 25 Jan 2002 04:46:54 -0800
Message-ID: <f2b4018f.0201250446.3b7b369_at_posting.google.com>


"Geoffrey" <g.dufour_at_swing.be> wrote in message news:<3c502b63$0$75157$ba620e4c_at_news.skynet.be>...
> Hi,
>
> Can you tell me why this script does not work ?
>
> (I have the right system privileges)
>
> =======================================================================
>
> CREATE OR REPLACE PROCEDURE test IS
>
> thesid NUMBER := 0;
>
> BEGIN
>
> Select sid into thesid from v$session where program = 'blablabla' and status
> != 'KILLED';
>
> END test;
>
> /
>
> quit;
>
> =======================================================================
>
> Regards.

Hi,
the procedure works fine. But if there is no hit, you get a no data found exception. You have to catch it. The same if there is more than one hit.

Jens Received on Fri Jan 25 2002 - 13:46:54 CET

Original text of this message