|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, July 27, 2012 11:13 AM
Points: 88,
Visits: 334
|
|
Comments posted to this topic are about the item Nested Stored Procedure
Vaibhav K Tiwari To walk fast walk alone To walk far walk together
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, March 14, 2013 4:15 AM
Points: 3,240,
Visits: 4,960
|
|
Very helpful script.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sometimes, winning is not an issue but trying. You can check my BLOG here
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, July 27, 2012 11:13 AM
Points: 88,
Visits: 334
|
|
Thanks Atif...
Vaibhav K Tiwari To walk fast walk alone To walk far walk together
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, March 14, 2013 4:15 AM
Points: 3,240,
Visits: 4,960
|
|
Hope ther is any way to find the nested tables as well.
In dependency, we get tables used with Insert, Update and Delete Operations. No way to find the tables used with simple Select statement.
i have been thinking over it. Any idea?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sometimes, winning is not an issue but trying. You can check my BLOG here
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, July 27, 2012 11:13 AM
Points: 88,
Visits: 334
|
|
We can do it but that will not standard and even it will not achieve great level of correctness. as we can find out table names in procedure script with sql pogramming. but it will read commented part also so there will be possibility of unwanted output
Vaibhav K Tiwari To walk fast walk alone To walk far walk together
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, March 25, 2013 8:55 AM
Points: 1,
Visits: 48
|
|
Liked the idea of quickly getting a list of dependent procs. I took your sql and modified it...
SELECT SCHEMA_NAME(o.schema_id) + '.' + o.name AS proc_name, SCHEMA_NAME(o2.schema_id) + '.' + o2.name AS dependent_proc_name FROM sysdepends d LEFT JOIN sys.objects o ON d.id = o.object_id LEFT JOIN sys.objects o2 ON d.depid = o2.object_id AND o2.Type = o.Type WHERE o.Type = 'p' AND o2.object_id IS NOT NULL ORDER BY 1, 2
|
|
|
|