Skip to content

Commit 145b32f

Browse files
authored
Update SSDB.Script_Refresh_Views.sql
1 parent dd65643 commit 145b32f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

SSDB.Script_Refresh_Views.sql

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
SELECT DISTINCT
2-
'EXEC sp_refreshview ''' + sc.name + '.' + so.name + '''' AS IndividualScript
3-
FROM sys.objects AS so
4-
INNER JOIN sys.schemas sc ON sc.schema_id = so.schema_id
5-
INNER JOIN sys.sql_dependencies AS sed
6-
ON so.object_id = sed.object_id
7-
WHERE so.type = 'V'
8-
--AND OBJECT_NAME(sed.referenced_major_id) LIKE 'MyTable%'
2+
IndividualScript = 'EXEC sp_refreshview ''' + sc.name + '.' + so.name + ''''
3+
FROM
4+
sys.objects AS so
5+
INNER JOIN sys.schemas sc ON sc.schema_id = so.schema_id
6+
INNER JOIN sys.sql_dependencies AS sed ON so.object_id = sed.object_id
7+
WHERE
8+
1=1
9+
AND so.type = 'V'
10+
--AND OBJECT_NAME(sed.referenced_major_id) LIKE 'MyTable%'

0 commit comments

Comments
 (0)