char database types blanks and nulls
Posted in 1992
Using Standard Engine
This sometimes returns a blank field for the value of column1
$string column1[20];
$declare test_curs cursor for
select distinct column1
into $column1
from test_table
where column1 is not null;$open test_curs;
$fetch test_curs;
I know that the informix char data type will blank fill to the end of a field.
If I am using the sting data type for the variable name the trailing blanks are
removed from the value placed into the array. If the field is blank doesn't the
database treat this as a null value? If not what situation will cause the
database to think there is a value in that field. Does it fill with a different
value for blank then when a user enters a blank character? If it thinks a
blank field is null why would it return with this cursor? Shouldn't the
where disallow the inclusion of this blank field with the other cursor values.
Thanks in advance for any help,
Rob
--
yslas@advtech.uswest.com
Thanks