Null value eliminated in set function
Posted in 1999
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
I am trying to figure out why a c program is crapping out. The code uses an esql statement to perform a select on a table and the SQLSTATE variable is used to look at the outcome. SQLSTATE comes back with a error code of 01003 which I've read means "Null value eliminated in set function". I'm no Informix guru and I have no clue what this means. Any suggestions? I believe the level of Informix is 7.22 and it's running on a rs/6000 with aix unix levle 4.2. Thanks...Rich
Richard Karwel wrote: > I am trying to figure out why a c program is crapping out. The code uses > an esql statement to perform a select on a table and the SQLSTATE > variable is used to look at the outcome. SQLSTATE comes back with a > error code of 01003 which I've read means "Null value eliminated in set > function". I'm no Informix guru and I have no clue what this means. Any > suggestions? I believe the level of Informix is 7.22 and it's running on > a rs/6000 with aix unix levle 4.2. Normally, if you do arithmetic (let's say you add a series of numbers), and if one of those numbers is NULL, then the overall result is also NULL. However, with the SQL aggregates (SUM in particular), the NULLs are ignored. However, the fact that they were ignored is recorded in the warning. If you looked in the SQLCA record instead of the SQLSTATE string, you'd find that at least two of the sqlwarn elements were set. The '01' prefix to SQLSTATE indicates a warning rather than an error, IIRC. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Richard Karwel wrote: > I am trying to figure out why a c program is crapping out. The code uses > an esql statement to perform a select on a table and the SQLSTATE > variable is used to look at the outcome. SQLSTATE comes back with a > error code of 01003 which I've read means "Null value eliminated in set > function". I'm no Informix guru and I have no clue what this means. Any > suggestions? I believe the level of Informix is 7.22 and it's running on > a rs/6000 with aix unix levle 4.2. > > Thanks...Rich This is to avoid returning a Null in your calculations when one or more of the elements in your calculation is Null. However I hope you get a warning not an error. You can trap such warning if you wished so that they do not appear on the screen, but are sent to a log file or ignored, depending on how important they may be to you. -- Compliments of QueriX -------------------------------------------------------------------------------------------------- QueriX 4GL Compilers are Informix 4GL Compatible. Some features are: True Windows GUI Clients. ActiveX support. HTML Report Generation. More rigorous error handling. Connection to all versions of Informix 4GL with no need to change compiler. Connection to other RDBMS such as Oracle. For more details visit: http://www.querix.com/ ---------------------------------------------------------------------------------------------------