May 8, 2012 at 5:01 am
Hello,
Is there any system function or variable that returns the name of the object that the function or variable is referenced within?
For example, if I have a stored procedure called "dbo.USP_Procedure", can I access something within that procedure that will return its name?
Regards
Steve
May 8, 2012 at 5:09 am
A combination of @@PROCID & OBJECT_NAME()?
http://msdn.microsoft.com/en-us/library/ms174408(v=sql.105).aspx
May 8, 2012 at 5:37 am
Gazareth (5/8/2012)
A combination of @@PROCID & OBJECT_NAME()?http://msdn.microsoft.com/en-us/library/ms174408(v=sql.105).aspx
Perfect! Thanks 🙂
May 9, 2012 at 2:57 am
No problem!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply