Create unique clustered index error 8662

Posted on 2008-06-09
Last Modified: 2010-04-21
Error 8662 is not allowing me to create a unique CLUSTERED INDEX  on a table.  Can some one please advise.
SQL 2000.

Question by:Rainbow002
  • 2
  • 2
LVL 142

Accepted Solution

Guy Hengel [angelIII / a3] earned 100 total points
ID: 21744916
not sure which error that is exactly, but there are only this reasons I know of off the top of my hat:
* there is already a clustered index on that table
* there is at least 2 rows that have the same values for column1, column2 and column3
* there is not enough space to create the index, and/or autogrow of the database cannot increase fast enough ...
* there is already a index with the same columns in that order

Author Comment

ID: 21745326
Below is the excat error:
Server: Msg 8662, Level 16, State 1, Line 1
An index cannot be created on the view 'VW_RES_FA_T' because the view definition includes an unknown value (the sum of a nullable expression).

Actually i was creating index on view but just got to know that we can't craete index on a view.  If we have to create one, do we have option to create this on a view.  Thanks!

LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 100 total points
ID: 21746061
>Actually i was creating index on view but just got to know that we can't craate index on a view.  I
you can, but it requires some conditions to be followed on the views' sql...
here is a good article summing it up:

Author Closing Comment

ID: 31465470
Thanks Angelll

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Having clause with Case 2 32
SQL Server; storing data in offline mode. 10 68
Trigger for audit 26 71
SQL Where not exists in same table 3 53
If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now