BUG: Index Cannot be Dropped if the Name Begins with "#" Character (254598)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q254598
BUG #: 57433 (SQLBUG_70)

SYMPTOMS

An index with a name starting with the identifier '#' can not be dropped using the DROP INDEX statement. The following error message occurs when you try to drop such an index:
Server: Msg 159, Level 15, State 1, Line 1
For DROP INDEX, you must give both the table and the index name, in the form tablename.indexname.

WORKAROUND

The workaround is to rename the index using SP_RENAME and then drop it.

For example:
sp_rename 'Categories.#index1','index1'
go
drop index Categories.index1
go
				

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0.

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug KB254598