Online Tutorials & Training Materials |
Register Login

SAP HANA db: "COUNT DISTINCT" does not return correct value for CalcView

09 Oct 2012 5:19 pm || 0

You model "COUNT DISTINCT" in a Calculation View and the result of a statement does not return the correct result for "COUNT DISTINCT" using the Calculation View
Due to a programming error the result of "COUNT DISTINCT" of an Calculation View is wrong under certain circumstances


    1. SAP HANA database Revision 10 or later

    2. The statement, which uses the modeled "COUNT DISTINCT" on a Calculation View, has both of the following constraints:

        a) the statement contains a WHERE-Clause having an operator, which is NOT "EQUAL" or uses "OR" to connect several WHERE conditions

        b) the column of the WHERE-Clause is not part of a "GROUP BY" of the statement

SAP is working on a solution asap.

Workaround: Check whether it is possible to add a "GROUP BY" with the column of the WHERE-Clause to your statement