SAP Knowledge Base Article - Preview

2198195 - Prior to SAP IQ 16 SP03 truncation occurred silently during data conversions

Symptom

Prior to version SP03, SAP IQ 16 did not log truncation errors for BIGINT, DOUBLE, DATE, DATETIME, INT, SMALLINT, TINYINT, UNSIGNED INT, UNSIGNED BIGINT to CHAR or VARCHAR data conversions. All data truncation occurred silently and, in some cases, this could result in incorrect column values.

Example:

Prior to "SAP IQ 16 SP03":
 
> create table Parms.test(a int);
> insert into Parms.test values(12345678);
 
(1 row affected)
 
> select a from Parms.test;
 
a
 
-----------
 
    12345678
 
(1 row affected)
 
> select cast(a as char(4)) from Parms.test;
 
a
 
----
 
1234
 
(1 row affected)
 
 
Starting with "SAP IQ 16 SP03":

> create table Parms.test(a int);
> insert into Parms.test values(12345678);
 
(1 row affected)
 
> select a from Parms.test;
 
a
 
-----------
 
    12345678
 
(1 row affected)
 
> select cast(a as char(4)) from Parms.test;
 
Msg 21, Level 14, State 0
 
SQL Anywhere Error -1001006: Data exception - data type conversion is not possible.
 
-- (dflib/dfe_Cast.cxx 940)
 
(0 rows affected)

 


Read more...

Environment

  • IQ 15.x
  • IQ 16 SP 01, 02

Keywords

data conversions truncation error, SQL Anywhere Error -1001006: Data exception - data type conversion is not possible (dflib/dfe_Cast.cxx 940) , 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 ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.