Re: IS [NOT] NULL predicate may be used only with simple columns.
Posted in 2006
On 4/7/06, Gentian Hila <genti.tech@gmail.com> wrote: > Good point. What is a so-called "simple colum" ? > On 4/7/06, Matt Penning <mmpenning@yahoo.com> wrote: > > I've run into the same thing [...] I've tried this on > > built-in types and run into this before, so apparently "built-in" <> > > "simple". > > Gentian Hila wrote: > > > ERROR [HY000] [Informix][Informix ODBC Driver][Informix]IS [NOT] NULL > > > predicate may be used only with simple columns. > > > > > > This is the error I get when I try to update all the fields of the a > > > table in Informix. > > > On 6 Apr 2006 23:18:41 -0700, Superboer <superboer7@t-online.de> wrote: > > >> ((? IS NULL AND )... > > >> --^^ > > >> > > >> does not sound right... > > >> what are you planning to fill in for the ? A simple column is a column name - such as customer_num or customers.customer_num or database@server:owner.table.column. It means no expressions, and no placeholders. The limitation has been in Informix forever - I vaguely remember coming across it a decade or so ago. It is an odd syntax, probably not officially blessed by the standard. It's odd because to use it, you typically end up passing the same host variable value to the server twice - once for the IS NULL test and once for whatever you do if it isn't null. I haven't verified this, but I'd not be surprised to find that the Oracle extension syntax that uses :1 to indicate the first placeholder (instead of ?) also permits you to repeat :1 more than once in the query - thereby avoiding the problem of having to send the same data multiple times to the server. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/