Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Drop index not working?

Author  Topic 

heze
Posting Yak Master

192 Posts

Posted - 2006-05-08 : 11:22:37
Hi

I created an index

CREATE INDEX my_ind ON myTable(myField)
then I tried top drop it

drop index MyDB.my_ind

the following is the result:

Cannot drop the index MyDB.my_ind', because it does not exist in the system catalog.

what could be the problem?

the example in BOL is:
IF EXISTS (SELECT name FROM sysindexes
WHERE name = 'au_id_ind')
DROP INDEX authors.au_id_ind

I also ran the conditional if exists and the error was the same

I am concerned because UI ran:
SELECT name FROM sysindexes
WHERE name = 'my_ind'

and it IS there but if I try to drop it it tells me it is NOT there

perhaps I am confusing the meaning of the word "There" and the "system catalog" is not the same as the sysindexes table?

than you

Kristen
Test

22859 Posts

Posted - 2006-05-08 : 11:34:54
"drop index MyDB.my_ind"

Did you mean

drop index MyTable.my_ind

Kristen
Go to Top of Page

heze
Posting Yak Master

192 Posts

Posted - 2006-05-08 : 11:41:19
I am very sorry and feel very stupid Kristen. Yes, I meant MyTable.my_ind. I had been dealing with this for 1 hour.

thanks
Go to Top of Page
   

- Advertisement -