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: Can a PL/SQL procedure or function tell its own name ?

Re: Can a PL/SQL procedure or function tell its own name ?

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Sat, 17 Nov 2007 11:58:02 +0100
Message-ID: <fhmm1e$oe7$1@news4.zwoll1.ov.home.nl>


Maxim Demenko wrote:

>
> Look at conditional compilation
> http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/fundamentals.htm#BABIHIHF
>
>
> SQL> CREATE or REPLACE PROCEDURE XXX as
> 2 BEGIN
> 3 dbms_output.put_line('this is procedure '||$$PLSQL_UNIT||' running');
> 4 END;
> 5 /
>
> Procedure created.
>
> SQL> set serveroutput on
> SQL> exec XXX
> this is procedure XXX running
>
> PL/SQL procedure successfully completed.
>
> Best regards
>
> Maxim

For those of you, not on 10.2, or in search of a complete calling stack (useful for error processing!), search asktom for who_called_me

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Sat Nov 17 2007 - 04:58:02 CST

Original text of this message

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