PL/SQL (MOSC)

MOSC Banner

Newbie: If else, never enters the else clause

edited May 5, 2015 3:24PM in PL/SQL (MOSC) 17 commentsAnswered ✓

Hi,

When the event is not found, I want to log this in the else clause, it never does (I have checked the v$sessions_Wait and the event is not present):

Regards

S

   begin

   for rec in (select sid from v$session_wait where event = 'SQL*Net break/reset to client')

   loop

   if rec.sid is not null then

   begin

   select l1.sid, l2.sid 

   into var_sid2, var_sid3

   from v$lock l1, v$lock l2

   where l1.block =1 and l2.request > 0

   and l1.id1=l2.id1

   and l1.id2=l2.id2;

   exception when NO_DATA_FOUND then

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center