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
Solved

Create unique clustered index error 8662

Posted on 2008-06-09
4
479 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do i Copy All the Tables from One Database to Another in SQL Server? 7 47
SQL Server 2012 express 24 40
Truncate vs Delete 63 107
CROSS APPLY 4 56
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 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