BUG: "If" or "Where Exists" Statements Report Syntax ErrorID: Q151609
|
If an "If Exists" or "Where Exists" statement returns more than one column, it will report a syntax error near a comma (,).
The following statement will cause the error:
if exists(select au_lname, au_fname from authors)
print 'if'
else
print 'else'
If you change the statement to only return au_lname, the query will successfully compile.
Microsoft 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.
Keywords : kbbug6.00
Version : 6.0
Platform : WINDOWS
Issue type :
Last Reviewed: March 26, 1999