Cannot create index on view

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Amin Sobati (amins_at_morva.net)
Date: 03/12/04


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