Cannot create index on view
From: Amin Sobati (amins_at_morva.net)
Date: 03/12/04
- Next message: anonymous_at_discussions.microsoft.com: "Re: DBCC DBREINDEX and DBCC INDEXDEFRAG not defragging indexes"
- Previous message: Umut Nazlica: "RE: Removing rows from very large table with indices"
- Next in thread: Scott Morris: "Re: Cannot create index on view"
- Reply: Scott Morris: "Re: Cannot create index on view"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 12 Mar 2004 19:01:58 +0430
Hi,
I have created a view but I cannot create index on it. My view is like this:
Create view v2 with schemabinding as
select distinct count_big(orderid) as MyCount from dbo.orders group by
orders.customerid
and my index command is:
create unique clustered index myidx2 on v2(MyCount)
I get this error:
Server: Msg 1936, Level 16, State 1, Line 1
Cannot index the view 'Northwind.dbo.v2'. It contains one or more disallowed
constructs.
Whats wrong?
Any help would be greatly appreciated.
Amin
- Next message: anonymous_at_discussions.microsoft.com: "Re: DBCC DBREINDEX and DBCC INDEXDEFRAG not defragging indexes"
- Previous message: Umut Nazlica: "RE: Removing rows from very large table with indices"
- Next in thread: Scott Morris: "Re: Cannot create index on view"
- Reply: Scott Morris: "Re: Cannot create index on view"
- Messages sorted by: [ date ] [ thread ]