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 |
|
WoodHouse
Posting Yak Master
211 Posts |
Posted - 2010-02-10 : 04:53:50
|
| Store Procedure Test1 is calling store procedure BStore Procedure Test2 is calling store procedure BQuestion From the store procedure B, Is it possible to find out the name of calling SP (SP name should not be passed as parameterHelp on this...thanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2010-02-10 : 05:13:07
|
| No you can't do that. I am afraid you will have to paas it by paramater value.Harsh Athalyehttp://www.letsgeek.net/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-02-10 : 06:29:27
|
| Have a look at @@PROCIDMadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-10 : 06:33:23
|
quote: Originally posted by madhivanan Have a look at @@PROCIDMadhivananFailing to plan is Planning to fail
@@PROCID returns the id of currently executing T-SQL module.I think OP wants a method to determine inside procedure B whether call has come from Store Procedure Test1 or Test2. So I think he might need to pass the procname as a parameter as suggested by Harsh------------------------------------------------------------------------------------------------------SQL Server MVP |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-02-10 : 07:33:29
|
quote: Originally posted by visakh16
quote: Originally posted by madhivanan Have a look at @@PROCIDMadhivananFailing to plan is Planning to fail
@@PROCID returns the id of currently executing T-SQL module.I think OP wants a method to determine inside procedure B whether call has come from Store Procedure Test1 or Test2. So I think he might need to pass the procname as a parameter as suggested by Harsh------------------------------------------------------------------------------------------------------SQL Server MVP
Yes. Instead of name, pass idMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|