forked from MasayukiOzawa/SQLServer-Util
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df05f6d
commit 218a347
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
SELECT | ||
ao.name, | ||
ao.type_desc, | ||
ao.type, | ||
ao.create_date, | ||
ao.modify_date, | ||
asm.definition, | ||
asm.*, | ||
-- インデックス付きビューの SET の条件についての確認 | ||
CASE | ||
WHEN type = 'P' THEN | ||
CASE | ||
WHEN asm.uses_ansi_nulls = 1 AND asm.uses_quoted_identifier = 1 THEN 1 | ||
ELSE 0 | ||
END | ||
WHEN type = 'V' THEN | ||
CASE | ||
WHEN asm.uses_ansi_nulls = 1 AND asm.uses_quoted_identifier = 1 AND asm.is_schema_bound = 1 THEN 1 | ||
ELSE 0 | ||
END | ||
ELSE NULL | ||
END AS indexd_view_requirements | ||
FROM | ||
sys.all_objects ao | ||
LEFT JOIN | ||
sys.all_sql_modules asm | ||
ON | ||
ao.object_id = asm.object_id | ||
WHERE | ||
is_ms_shipped = 0 | ||
ORDER BY name ASC | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters