Symptom
- IQ server returns an incorrect result against a select statement having a RANK below.
- Problematic sql
select *
, rank() over( partition by col1 order by col3 ) min_rank
, rank() over( partition by col1 order by col3 desc ) max_rank
from ztmp
order by 3;
- Incorrect result
col1 col2 col3 min_rank max_rank
AA BA 11 2 2 // should be 1 for min_rank
AA BA 22 1 1 // should be 2 for min_rank
AB BA 33 3 3 // should be 1 for min_rank
AB BB 44 2 2
AB BB 55 1 1 // should be 3 for min_rank
Read more...
Environment
SAP SYBASE IQ 15.2, IQ 15.4 IQ 16.0
Product
Keywords
Incorrect result, RANK, Row_Number , 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.