Re: NULL value
Posted in 1998
julie lin wrote: > Hello, > > I have a little ESQL/C program which fetchs data using dynamic binding > method (has replacable parameters "?" in the where condition) , my > problem is it fails to fetch NULL value if I bind the replacable > parameters with a string containing only '\\0'. Why it doesn't work if > informix indicates a character field containing a NULL as its value by > > storing a zero byte in the first character ? > > I'm using INFORMIX-ESQL Version 7.24.UC2 on AIX 4.2.1 > > Thanks! A NULL value does not match to any distinct value (and that's what you are trying to do) by definition of SQL. It is only "by chance" that Informix (unfortunately) indicates NULL values by storing a '\\0' in the leftmost character (also in INTEGER etc.). Regards -- Helmut Leininger Bull AG / Vienna Unix Support Email: helmut.leininger@bull.de This opinion is mine and not necessarily that of my employer. No guarantees whatsoever.