• Angel, thank you for the idea but I would rather use the following script instead (SQL2008 and up):

    SELECT DISTINCT referenced_entity_name FROM sys.dm_sql_referenced_entities ('[schema].[objectname]', 'OBJECT')