Re: Convert Nulls in Select statement
Posted in 1997
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Paul Yurga wrote: > > Is there a way to have a null field converted to a default value (say 0 > for an int) in a SQL statement? Sybase had a coerse statement I believe > that could do this. I need non null values to do computations with > later, but the table allows nulls by default so I have to deal with them > also. A simple function that converts a null to a default value on the > fly would be fine if I could figure out how to do it. I'm new to > Informix so any help would be appreciated. I will assume that you are using 4GL or ESQL/C. If you include indicator variables in your select statements then you can test the indicator for NULLs and substitute an appropriate default in your application. Art S. Kagel