Symptom
Incorrect result could be seen when
- a query involves a view with union all of several tables
- HG index exists on the same column of each of the underlying tables.
- the optimizer uses the HG indexes
- the query has a IN clause with a subselect on another table
The SQL looks like the following:
SELECT COUNT(*) FROM TEST_VIEW
WHERE
DT = DATE('2019-05-31')
AND VAL IN ( SELECT DISTINCT VAL FROM MASTER WHERE STATIC_VAL = '1515')
- The HG indexes are on the column VAL in the underlying tables of the view TEST_VIEW.
- When those HG indexes are deleted, the query returns the correct result.
Read more...
Environment
- SAP IQ 16.1
- SAP IQ 16.0
Product
SAP IQ 16.0 ; SAP IQ 16.1
Keywords
CR819905 ; CR#819905 ; 819905 ; "union all" ; IN ; "IN clause" , KBA , BC-SYB-IQ , Sybase IQ , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview