on 2020 Oct 21 12:36 PM
Select statement on HANA Graphical Calculation View throws error
COL3 (CALCULATED_COL3) is a calculated column with simple expression if(isnull("AMOUNT"),0,"AMOUNT") as shown in attached snapshot.
SELECT "COL1", "COL2", SUM("CALCULATED_COL3") AS "CALCULATED_COL3_SUM"
FROM "_SYS_BIC"."CALCULATION_VIEW"('PLACEHOLDER' = ('$C_DATE$', '2020-10-02'))
WHERE "COL1" = 'ABC'
GROUP BY "COL1", "COL2"
---Error message
Could not execute 'SELECT "COL1", "COL2", SUM("CALCULATED_COL3") AS "CALCULATED_COL3_SUM" FROM ...' in 3.849 seconds .
SAP DBTech JDBC: [2048]: column store error: search table error: [2999] general error (no further information available);qo_Exp for attribute 'COL1' for RuntimeInput '$REQUEST$' of RuntimeNode '$REQUEST$_POST' not found
Observation: Below 2 cases , the statement works without any issue
1. when I remove where clause from the query , it works well without any error
SELECT "COL1", "COL2", SUM("CALCULATED_COL3") AS "CALCULATED_COL3_SUM"
FROM "_SYS_BIC"."CALCULATION_VIEW"('PLACEHOLDER' = ('$$C_DATE$$', '2020-10-02'))
--WHERE "COL1" = 'ABC' --commented
GROUP BY "COL1", "COL2"
2. when I use the Calculated column expression directly in Select Statement , it works without any error
SELECT "COL1", "COL2", SUM(ifnull("AMOUNT",0)) AS "CALCULATED_COL3_SUM"
FROM "_SYS_BIC"."CALCULATION_VIEW"('PLACEHOLDER' = ('$C_DATE$', '2020-10-02'))
WHERE "COL1" = 'ABC'
GROUP BY "COL1", "COL2"
Request clarification before answering.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.