The information in this article applies to:
SYMPTOMSWhen an SQL query statement contains multiple aggregate functions, the result set incorrectly contains the same value for all the functions. The result of the first aggregate function is duplicated in the result column of all of the other functions. CAUSE
Aggregate functions typically do not contain explicit column names for
expressions in the SQL query. In SQL queries containing multiple
aggregate function calls, the Access database layer does not uniquely
identify the return columns for any functions past the first. Therefore,
it duplicates the result column of the first function in the result
columns of the succeeding functions WORKAROUNDUse aliases for the aggregate functions to solve the problem. Replace the SQL statement shown below in the "Steps to Reproduce Problem" section with the following SQL statement, which contains the aliases One and Two for the column names for the separate SUM expressions:
The Alias names can be anything other than the column name and must
be unique within the statement.After inserting the aliases, run the SQL statement again and notice that the two fields now correctly show the different results. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONSteps to Reproduce Problem
Additional query words: buglist3.00 3.00
Keywords : |
Last Reviewed: August 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |