Re: unexpected NULL values
Posted in 1998
ProzessDV wrote: > > We migrate from an old database (DDB/4) to OWS 7.22 on SCO UNIX. When a row was > inserted on the old system into a char-column by a host variable containing > nothing ( colx = "") the database did not contain anything, either. But > informix inserts a NULL value into this column. Is there a way to leave our > code unchanged but to insert "nothing" ("") instead of a NULL value? > > Thanks in advance, > S'kr' NULL is nothing. You might prefer to have empty strings as blanks strings. In a CHAR column, " " will fill the whole of the column with spaces. It compares = to " ". To change: UPDATE mytable SET mycharcol = ' ' WHERE mycharcol IS NULL. -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 --- If all else fails, read the instructions and the release notes. Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/ ---