In SAP HANA I had the following query (simplified):
select col1, col2 from TBL
where col1 > 0 and col2/col1 > 3
This results in the error:
[304]: division by zero undefined: search table error: [6859] AttributeEngine: divide by zero
Even when I try
select * from (
select col1, col2 from TBL
where col1 > 0
) where col2/col1 > 3
results in the same error.
NOTE for simplification I changed the SQL.
TBL is acually a Graphical Calculation view and there are more attributes.
But executing the inner SQL works OK
When adding the outer where condition the error occurs.
Request clarification before answering.
There might the some condition when col1 is 0. You need to handle these condition specifically with the help of CASE statement or there are also other way you can do these.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 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.