Microsoft KB Archive/136959

{|
 * width="100%"|

FIX: Cannot Create a Qualified Table With a Check Constraint

 * }

Q136959

-

The information in this article applies to:


 * Microsoft SQL Server version 6.0

-

SYMPTOMS
When you attempt to create a table with the username.tablename format and a check constraint, you can get message 15009:

The object 'username.tablename' does not exist'.

CAUSE
The full qualified table name is not being passed to the CHECK routine, and therefore the columns being tested do not have the base table information.

WORKAROUND
Where possible, refrain from using the qualified table name or use a trigger instead of the check constraint. If the qualified table name is necessary, use the SETUSER function to impersonate the table owner.

STATUS
Microsoft has confirmed this to be a problem in SQL Server version 6.0. This problem was corrected in Service Pack 1 for SQL Server version 6.0. For more information, contact your primary support provider.

Additional query words: sql6

Keywords : kbprogramming

Issue type : kbbug

Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600