Generate script for view dependencies of user defined table types ?

  • Hi All,

    can you please provide the T-SQL script for the following request ?

    Generate script for view dependencies of user defined table types ?

  • kbhanu15 (8/25/2014)


    Hi All,

    can you please provide the T-SQL script for the following request ?

    Generate script for view dependencies of user defined table types ?

    Quick solution, searches sys.parameters for the user type

    😎

    DECLARE @USER_TYPE_NAME NVARCHAR(128) = N'MyUserTypeName'

    SELECT

    OBJECT_NAME(SP.object_id) AS OBJECT_THAT_USES_MY_TYPE

    FROM sys.parameters SP

    INNER JOIN sys.types ST

    ON SP.user_type_id = ST.user_type_id

    WHERE ST.name = @USER_TYPE_NAME

  • Thank you very much.

    it is working fine.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply