Home Forums SQL Server 2005 T-SQL (SS2K5) How do I capture the active Stored Procedure Name to use in an error message RE: How do I capture the active Stored Procedure Name to use in an error message
Sergiy
SSC Guru
Points: 110206
More actions
May 11, 2016 at 7:22 pm
#1878418
Inside of a stored procedure you may use OBJECT_NAME(@@PROCID)
OBJECT_NAME(@@PROCID)
This will work for triggers as well.
_____________Code for TallyGenerator