Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can a PL/SQL procedure or function tell its own name ?
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
![]() |
![]() |