Alvin Ramard (6/23/2015)
leetrueman (6/23/2015)
The first oneCREATE NONCLUSTERED INDEX idx_Transactions_TransTime
ON dbo.transactions (trans_time, SiteID)
INCLUDE (transactionID,siteID,areacode,gamename,sitename)
GO
is reporting
Msg 1909, Level 16, State 2, Line 1
Cannot use duplicate column names in index. Column name 'SiteID' listed more than once.
?
Try removing siteID from the INCLUDE clause:
CREATE NONCLUSTERED INDEX idx_Transactions_TransTime
ON dbo.transactions (trans_time, SiteID)
INCLUDE (transactionID, areacode, gamename, sitename)
GO
Sorry about that. Copy-paste error.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability