Re: unexpected NULL values
Posted in 1998
In article <36487DD2.B00@bayer.co.uk>, Peter Lancashire <Peter.Lancashi
re.PL1@bayer.co.uk> writes
>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
WRONG!!!! WRONG!!! WRONG!!! SLAP!! WALLOP!! KICK!! SLAP!!!
NULL=undefined...
NULL != "", since "" is a defined value..
>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.
UPDATE mytable SET mycharcol = '' WHERE mycharcol IS NULL.
--
David Williams
Maintainer of the Informix FAQ
Primary site (Beta Version) http://www.smooth1.demon.co.uk
Official site http://www.iiug.org/techinfo/faq/faq_top.html
I see you standin', Standin' on your own, It's such a lonely place for you, For
you to be If you need a shoulder, Or if you need a friend, I'll be here
standing, Until the bitter end...
So don't chastise me Or think I, I mean you harm...
All I ever wanted Was for you To know that I care