IBM Developerworks - Informix Developer and User Forum

SQL Syntax error with NVL() and SQL parameter

Wed, 11/12/2019 - 08:00

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

Categories: Informix

Using screen record with wordwrap field

Wed, 11/12/2019 - 07:41

I want to display a data in such a way on the screen that the attribute k000 can display more than 100 characters and is the description of  k3 field.

The same has to be part of a record s_cutomercomm which should be an array of size 5. If i put it up like below , I get an error on compilation . Error code -2029.(Screen record array name has component sizes which either differ from the specified dimension of the array or differ among themselves.)

Please suggest how to display this information. 

 

screen
{
==============================================================================

[k3][k000                                                                    ]
    [k000                                                                    ]
[k3][k000                                                                    ]
    [k000                                                                    ]
[k3][k000                                                                    ]
    [k000                                                                    ]
[k3][k000                                                                    ]
    [k000                                                                    ]
[k3][k000                                                                    ]
    [k000                                                                    ]

================================= Avbryt: F9 =================================
}
end

attributes
   k3   = formonly.adv_type type char, upshift;
   k000 = formonly.komm_adr type char, wordwrap compress;
end

 screen record s_cutomercomm[5]
         (adv_type,
          komm_adr)
end

Categories: Informix