Knowledge Base

BUG: Unable to Drop a Constraint with a Period in the Name

Article ID: 189804

Article Last Modified on 10/3/2003


APPLIES TO


This article was previously published under Q189804
BUG #: 16752 (SQLBUG_65)

SYMPTOMS

If you create a constraint with periods in the constraint name, you cannot drop the constraint after it is created.

When you try to drop the constraint that has periods in its name using a statement similar to:
   alter table mytable drop constraint "constraint.name"
				

You receive the following error:
Msg 3731, Level 16, State 0
'constraint.name' is not a valid object.
Msg 3727, Level 16, State 0
Unable to drop constraint. See Previous Error

WORKAROUND

To work around this problem, do not create constraints with periods in their names.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5 We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Using SET QUOTED_IDENTIFIER ON, you are able to create constraints with periods in their names. After these constraints are created, you are unable to drop them.


Additional query words: constraint,quoted_identifier

Keywords: kbbug kbpending KB189804