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: ORA-00920 when using function returning boolean...

Re: ORA-00920 when using function returning boolean...

From: Maxim Demenko <mdemenko_at_arcor.de>
Date: Mon, 12 Sep 2005 18:55:48 +0200
Message-ID: <4325b324$0$2101$9b4e6d93@newsread2.arcor-online.net>


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;

>
> Tried it, still got the same error.
> I've opened a TAR for this.
>
> Lots of Greetings!
> Volker

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

Original text of this message

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