Microsoft KB Archive/814577

= PRB: &quot;Incorrect Syntax Near&quot; Error When You Run the DBCC CHECKCONSTRAINTS Statement =

Article ID: 814577

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



BUG #: 363951 (SHILOH_Bugs)



SYMPTOMS
When you run the DBCC CHECKCONSTRAINTS statement in SQL Query Analyzer, you may receive the following error message:

Server: Msg 170, Level 15, State 1, Line 1

Line 1: Incorrect syntax near ')'.

DBCC execution completed. If DBCC printed error messages, contact your system administrator.



CAUSE
The error occurs because the value of the CONCAT_NULL_YIELDS_NULL database option is set to OFF.



RESOLUTION
To resolve the problem, set the value of the CONCAT_NULL_YIELDS_NULL database option to ON before you run the DBCC CHECKCONSTRAINTS statement.

To set this value, perform one of the following procedures:   Run the following code in SQL Query Analyzer: SET CONCAT_NULL_YIELDS_NULL ON 

-Or-
 * In SQL Query Analyzer:
 * On the Query menu, click Current Connection Properties.
 * Click to select the Set concat_null_yields_null SET option.
 * Click OK.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
The default value of the CONCAT_NULL_YIELDS_NULL database option is ON in SQL Query Analyzer.

For more information, visit the following Microsoft Developer Network (MSDN) Web site links:

DBCC CHECKCONSTRAINTS

SET CONCAT_NULL_YIELDS_NULL

Sp_dboption

Setting Database Options

