Venkat (2/6/2009)
HiI have two procedures
a) Procedure A
b) Procedure B
By design, Procedure B calls Procedure A internally. However, Two procedures can be executed independently .
I want to findout that if procedure A is called
- Is it called from Procedure B or
- is it called independently ie not from any other procedure
Your reply will help me a lot
Thanks
Venkat
If Procedure B creates a local temporary table (example #MyHead) prior to calling Procedure A, you can test for the exitance of the temporary table as Procedure A will be able to see and use the local temporary table internally. If called independent of Procedure B, this table would not exist.
The only other way that I can think of would be a optional parameter to Procedure A that would be used when calling Procedure A from within Procedure B and left null when called independent of Procedure B.