Symptom
IQ incorrectly accepts zero date/timestamps. This behavior was detected on SAP IQ 16.0 SP04 PL09 but works fine on SAP IQ 16.0 SP10 PL03.
-
SAP IQ/16.0.102.1257/20056/P/sp10.03/Enterprise Linux64 - x86_64 - 2.6.18-194.el5/64bit/2015-08-20 17:45:23
1> create table tb01 (col1 timestamp null);
2> go1> insert into tb01 values ('0000-00-00')
2> go
Msg 257, Level 16, State 0:
SQL Anywhere Error -157: Cannot convert 0000-00-00 to a datetime(23) (column col1)
(0 rows affected)1> select * from tb01
2> go
col1----------------------------------
(0 rows affected)
-
SAP IQ/16.1.040.1632/15175/P/SP04.09/Linux/Linux64 - x86_64 - 3.10.0-327/64bit/2021-03-02 00:59:47
1> create table tb01 (col1 timestamp null)
2> go1> insert into tb01 values ('0000-00-00')
2> go
(1 row affected)1> select * from tb01
2> go
col1
----------------------------------Jan 5 0001 8:00:00.000000AM
=======
We can see that INSERT fails on "SAP IQ 16.0 SP10 PL03" (correct behavior) while this INSERT runs fine on "SAP IQ 16.1 SP04 PL09" (wrong behavior).
We can see the same behaviors when using DBISQL.
Read more...
Environment
- SAP IQ 16.0 SP04 PL09
- SAP IQ 16.0 SP10 PL03
Product
Keywords
insert Cannot convert timestamp date value were incorrectly accepted as valid values wrong behavior 0000-00-00 00:00:00 SQL Anywhere Error -157 824651 CR 824651 CR824651 CR#824651 , 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.