Nested Stored Procedure

  • 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

  • Very helpful script.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • Thanks Atif...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • 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
    [font="Arial Black"]here[/font][/url][/right]

  • 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

  • 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