Ms sql view not updating dating drew
NET) when querying for some data returns data different from when the customer looks into the data table directly.
I understand there could be various reasons and in completely different places.
The following example creates a script that refreshes the metadata for all views that have a dependency on table USE Adventure Works2012; GO SELECT DISTINCT ' EXEC sp_refreshview ''' name '''' FROM sys.objects AS so INNER JOIN sys.sql_expression_dependencies AS sed ON so.object_id = sed.referencing_id WHERE = ' V' AND sed.referenced_id = OBJECT_ID(' Person.
When a view is created in SQL Server, metadata for the referenced table columns (column name and ordinal position) is persisted in the database.|-