BUG: "If" or "Where Exists" Statemnents Report Syntax ErrorLast reviewed: May 2, 1997Article ID: Q151609 |
The information in this article applies to:
SYMPTOMSIf an "If Exists" or "Where Exists" statement returns more than one column, it will report a syntax error near a comma (,).
CAUSEThe following statement will cause the error: if exists(select au_lname, au_fname from authors) print 'if'else print 'else' WORKAROUNDIf you change the statement to only return au_lname, the query will successfully compile.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. This problem does not occur in Microsoft SQL Server version 6.5.
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |