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 -> Help: Is there any way I can catch the sql that calls the function from inside the function?

Help: Is there any way I can catch the sql that calls the function from inside the function?

From: NewRacGuy <NewRacGuy(nospam)_at_hotmail.com>
Date: Fri, 11 Nov 2005 00:29:04 GMT
Message-ID: <kBRcf.7404$941.6609@trndny02>


Group,

I wrote a function like this



create or replace function test_function (l_data_input in varchar2)
return varchar2 as
result varchar2(2000);
begin

   select sql_text into result from v$session a,v$sql b     where a.sql_address = b.address

        and a.sql_hash_value = b.hashvalue
        and a.audsid = sys_context('USERENV','SESSIONID');
return result;
end;

Then I do "select test_function(ssn) from test", what I got is the sql "select sql_text into ....", this is not what I wanted. I would like to catch the sql "select test_function(ssn).....".

Is there any way of doing it?

Thanks very much for your help. Received on Thu Nov 10 2005 - 18:29:04 CST

Original text of this message

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