IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this forum will no longer be available. More details available on our FAQ.
Topic
  • No replies
Seb Flaesch
Seb Flaesch
1 Post

Pinned topic SQL Syntax error with NVL() and SQL parameter

‏2019-06-07T10:52:26Z | error nvl parameter sql syntax

Hi all,

We may have found a bug in the SQL parser when combining NVL() with a sub-select, and an SQL parameter.

Depending on where the SQL parameter is used we get the syntax error. Maybe this is expected but we wonder.

Tested with ESQL/C:

$ esql -V
IBM Informix CSDK Version 4.50, IBM Informix-ESQL Version 4.50.FC1

$ dbaccess -V
DB-Access Version 14.10.FC1DE

 

Check attached program. We get following result:

$ esql -o test003.bin test003.ec  && ./test003.bin
>> [DATABASE test1]:  sqlcode=0
>> [CREATE TEMP TABLE tt1]:  sqlcode=0
>> [INSERT INTO tt1]:  sqlcode=0
>> [CREATE TEMP TABLE tt2]:  sqlcode=0
>> [INSERT INTO tt2]:  sqlcode=0
>> [UPDATE tt2 (works)]:  sqlcode=0
>> [UPDATE tt2 (works)]:  sqlcode=0
>> [UPDATE tt2 (fails)]:  sqlcode=-201

 

Please can someone from the dev team confirm and provide a bug id so we can track this issue?

Thanks

Seb

Attachments

Updated on 2019-06-07T10:53:33Z at 2019-06-07T10:53:33Z by Seb Flaesch