Home Dashboard Directory Help
Search

Couple of points on indexed view topic in BOL by Martin Smith


Status: 

Active


1
0
Sign in
to vote
Type: Suggestion
ID: 775918
Opened: 1/6/2013 12:56:51 PM
Access Restriction: Public
0
Workaround(s)
view

Description

Referring to http://msdn.microsoft.com/en-us/library/ms191432(v=sql.110).aspx

Contains the following text

* If the SELECT statement in the view definition specifies a GROUP BY clause, the key of the unique clustered index can reference only columns specified in the GROUP BY clause.
* If the view definition contains a GROUP BY clause, the key of the unique clustered index can reference only the columns specified in the GROUP BY clause.

The second point seems to just be a stricter version of the first one making that redundant.

Under the heading "The SELECT statement in the view definition must not contain the following Transact-SQL elements:"

The list seems to be missing CHECKSUM_AGG also it explicitly states COUNT(*) which implies that COUNT(column) might be alright whereas that is not permitted either.
Details
Sign in to post a comment.
Posted by Microsoft on 3/5/2013 at 9:51 AM
The corrections to the topic are now published to MSDN.

Kind regards,
Gail Erickson
SQL Server Documentation Team
Posted by Microsoft on 1/15/2013 at 12:05 PM
Thanks for pointing out this inconsistencies in the indexed view topic. We will review and make corrections as needed.

Kind regards,
Gail Erickson
SQL Server Documentation Team
Sign in to post a workaround.