Reputation: 40062
I use the following query to find dependencies on a view
SELECT referenced_entity_name,* FROM
sys.dm_sql_referenced_entities ('dbo.WEB_ANALYSER', 'OBJECT')
This returns tables and views used in the View. I want the above query to only return dependencies that are views
Thanks
Upvotes: 0
Views: 2520
Reputation: 138980
select referenced_entity_name, re.*
from sys.dm_sql_referenced_entities ('dbo.WEB_ANALYSER', 'OBJECT') as re
inner join sys.views as sv
on sv.name = re.referenced_entity_name
Upvotes: 3