Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shmecher
Starting Member
10 Posts |
Posted - 2005-02-10 : 10:37:42
|
| Hi. I'm new to T-SQL and I would like to know if there is a function that gets the name of the stored procedure (in which the function is being called from).Thanks |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-02-10 : 10:43:56
|
if you call this directly in the sproc:select name from sysobjects where id = @@ProcIdCorey "If the only tool you have is a hammer, the whole world looks like a nail." - Mark Twain |
 |
|
|
TimS
Posting Yak Master
198 Posts |
Posted - 2005-02-10 : 10:53:38
|
| SELECT OBJECT_NAME(@@ProcID) Should work also inside procTim S |
 |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-02-10 : 10:56:05
|
thats what I couldn't think of !! Corey "If the only tool you have is a hammer, the whole world looks like a nail." - Mark Twain |
 |
|
|
shmecher
Starting Member
10 Posts |
Posted - 2005-02-11 : 14:40:54
|
| Thanks guys |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-02-11 : 15:23:38
|
| SELECT * FROM INFORMATION_SCHEMA.ROUTINESBrett8-) |
 |
|
|
|
|
|