April 1, 2010 at 7:22 pm
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
April 22, 2010 at 11:09 pm
April 23, 2010 at 12:21 am
Thanks Atif...
Vaibhav K Tiwari
To walk fast walk alone
To walk far walk together
April 23, 2010 at 1:53 am
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?
April 23, 2010 at 2:23 am
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
July 22, 2010 at 1:37 pm
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
ANDo2.Type = o.Type
WHERE
o.Type = 'p'
AND o2.object_id IS NOT NULL
ORDER BY
1, 2
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply