Solved

Create unique clustered index error 8662

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

CREATE UNIQUE CLUSTERED INDEX
INDEX NAME
ON DBO.TABLE NAME
(
COLUMN1, COLUMN2, COLUMN
)
Thanks!
0
Comment
Question by:Rainbow002
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
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
0
 

Author Comment

by:Rainbow002
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!

0
 
LVL 143

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:
http://www.sqlteam.com/article/indexed-views-in-sql-server-2000
0
 

Author Closing Comment

by:Rainbow002
ID: 31465470
Thanks Angelll
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Insert from Stored Procedure where some field/s > 0 7 48
Format Date fields 11 65
Substring works but need to tweak it 14 35
denied execute as 13 57
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

710 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