Re: Is this a bug?
Posted in 1997
Bret Lowry <lowry@netime.com> wrote: :Rajendra Singh wrote: :> :> We're running SE 6.0 on HP/UX 9.04. I had a query similar to the :> following: :> :> select f1, f2, f3 from tablename where (f1 >= 1 and f1 <= 1) or (f1 >= :> 71 and f1 <= 71) :> :> ... I know it could've been written as: :> select f1, f2, f3 from tablename where f1 = 1 or f1 = 71; but the :> statement was as above. :> :> Anyway, when the first SQL statement above was executed we got the :> following error: -25580 System error occurred in network function. :> There was one row in the table matching the criteria. If we modified :> the SQL statement to the second form above, it worked. :> :> Why is this? Both statements should've worked! :> -- :Yeah, both statements should have worked. Maybe the first was rejected :on the basis of being too ugly. Seriously, I've written some ugly code :myself in the past that resulted in a similar error too. I think the :engine gets "confused" by statements that are somewhat out of the :ordinary. Best to keep it simple, who wants job security anyway. Bret If your advice where necessary we would all be in realy big trouble. It's definitely not the case that you have to keep things simple at *this* level. Things like joining a large number of tables, using several subqueries and some other things is another issue, but then only for performance reasons. Informix engines are generally able to handle complex sql without problems (this example isn't even complex) and it have to be. Appart from the things David mentioned, and possibly some other unknown issues, this must be a defect. It is quite strange though, and a little alarming. I hope Rajendra Singh will report back when he finds out what is wrong. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org