• Increase font size
  • Default font size
  • Decrease font size
Home T-SQL Use column in Views

Use column in Views

E-mail Print
(0 votes)

ms_sql_2_refresh_128 Inside SQL Server 2005 it is possible to see which tables and which columns are used in a View. Requires a System View in any database. This view is created automatically.

Best practice is for each report / ETL package a view to mean that you have the logic in one place. Using the following query you can easily determine the impact of a change because you can quickly see where the columns are used within the Data Warehouse!

artikelen/tsql/views_zoeken/zoeken_in_views03.jpg

  * SELECT *
 INFORMATION_SCHEMA. VIEW_COLUMN_USAGE FROM INFORMATION_SCHEMA. VIEW_COLUMN_USAGE 

artikelen/tsql/views_zoeken/zoeken_in_views01.jpg

artikelen/tsql/views_zoeken/zoeken_in_views02.jpg

Copyright 2008. All Rights Reserved.

Trackback (0)

TrackBack URI for this post

Comments (2)

RSS feed Comments
...
0
Just a pity that this view is level and not at column level smilies/sad.gif
You want to see because the actual column formula, not the global view dependencies.
For that you unfortunately the XML query plan to sift
, januari 27, 2009 DM Unseen , January 27, 2009
  • Report abuse
  • 0
  • Report abuse
  • Report abuse
...
63
What exactly do you want to achieve than one query column level? This is purely to see which columns are used in views, such as the impact of a change analysis (which reports to use the columns). There is here a further article about how you can find columns in your database.
, januari 27, 2009 Ronald Kraijesteijn , January 27, 2009
  • Report abuse
  • 0
  • Report abuse
  • Report abuse

Write comment

bold italicize underline strike url image quote smile wink laugh grin angry sad shocked cool tongue kiss cry
| groter smaller | bigger
security image
Write the displayed characters

busy