In a stored procedure, how can I get the name of the sproc in SQL Server 2005?

I want to dynamically get the name of the current stored procedure inside itself for logging purposes.

11.12.2008 02:28:24
1 ОТВЕТ
РЕШЕНИЕ

Try this:

OBJECT_NAME(@@PROCID)
3
11.12.2008 02:46:22