Newbie: If else, never enters the else clause
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