SAP Knowledge Base Article - Preview

2133818 - Invalid data type comparison in predicate - SAP IQ 15.4

Symptom

Following SQL Error happened, when there is empty table, Numeric/INT column of  aggregation function and HAVING clause inside the SQL.
Here is the repro query.

    CREATE TABLE TEST1 (
                 A CHAR(10),
                 B NUMERIC(15) );

    CREATE HG INDEX  A_INDEX ON TEST1(A);

    SELECT A,SUM(B) SUM_B FROM TEST1
     GROUP BY A
    HAVING SUM_B>=3 ;
   
   * Error MSG =>

     There was an error reading the results of the SQL statement.
     The displayed results may be incorrect or incomplete.
     Invalid data type comparison in predicate  HAVING COUNT(TEST1.A) >=
     CAST(CEILING((3 / MAX(TEST1.B))) AS UINT64),  -- (dfp_Simple.cxx 664)
     SQLCODE=-1001013, ODBC 3 State="HY000"


Read more...

Environment

  • SAP IQ15.4

Product

SAP Sybase IQ 15.4

Keywords

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.