1

I'm trying to get a full picture of views refernces in my DB. In other words, I want to know for each field in each view - where it is getting its data from.

I know I can get the objects referenced by a view using: FROM sys.dm_sql_referenced_entities ('[object name]', 'OBJECT');.

Is there a way to find which field in the referencing object referenced which field in the referenced object?

OzW
  • 848
  • 1
  • 11
  • 24
  • Maybe related: [information schema vs sys](http://stackoverflow.com/questions/3653637/sql-server-should-i-use-information-schema-tables-over-sys-tables). – Kenney Sep 20 '15 at 11:24
  • I'm starting to think that what I'm looking for isn't really possible, at least not in my case, where a single field in a view can derive from multiple sources (using `UNION`). – OzW Sep 20 '15 at 11:50
  • for example, UNION, or a CASE statement, or a concatenated column - but that isn't to say that you couldn't get a full picture, it's just that each field might have multiple dependencies. – Robert Dupuy Sep 20 '15 at 15:10

0 Answers0