Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-00920 when using function returning boolean...
Volker Hetzer schrieb:
> Maxim Demenko wrote:
>
>> select SessionId >> from (select SessionId from CVC_EDDY1 UNION select SessionId from >> CVC_EDDY2) >> where >> SYS.DIUTIL.BOOL_TO_INT(dbms_session.is_session_alive(SessionId)) = 1;
Sorry, i provided wrong example to you.
That should work
scott_at_ORA92> var usid varchar2(200)
scott_at_ORA92> exec :usid := dbms_session.unique_session_id
PL/SQL procedure successfully completed.
scott_at_ORA92> create or replace function is_session_alive(p_usid in varchar2)
2 return number
3 is
4 l_retval number;
5 begin
6 l_retval :=
sys.diutil.bool_to_int(dbms_session.is_session_alive(p_usid));
7 return l_retval;
8 end;
9 /
Function created.
scott_at_ORA92> select is_session_alive(:usid) from dual;
IS_SESSION_ALIVE(:USID)
1
scott_at_ORA92>
Best regards
Maxim Received on Mon Sep 12 2005 - 11:55:48 CDT
![]() |
![]() |