Microsoft KB Archive/199720

= BUG: SPs w/ Aggregate Functions in HAVING Clause can Cause AVs =

Article ID: 199720

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q199720



BUG #: 16906 (SQLBUG_65)



SYMPTOMS
Running a stored procedure that meets the following conditions can cause handled exceptions or result in message 107:
 * The stored procedure has an aggregate in its HAVING clause.
 * The underlying table on which this having clause depends is dropped and recreated.

The text of this error message is:

Msg 107: The column prefix '' does not match with a table name or alias name used in the query.

Recompiling the stored procedure does not eliminate the problem, and neither does creating the procedure with the 'WITH RECOMPILE' option.



WORKAROUND
Drop and recreate the stored procedure



STATUS
Microsoft has confirmed this to be a problem in SQL Server 6.5.

Keywords: kbbug kbpending KB199720

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.