Unanswered: Corresponding types must be compatible in CASE expression
I am very new to Informix and am looking for some advice
Can I ever get in case expression a different data type to be displayed in the field
I.e. clmov_loctype is a char field and clmov_movedate is a DATE field
Is there any way I can get the following expression to work, and pick up a date field instead of a char, as at the moment the conflicting data types errors as:
"Corresponding types must be compatible in CASE expression"
CASE WHEN clmov_loctype IS NULL THEN clmov_movedate ELSE "BOOKED OUT" END type
Cast the datetime to char datatype.
The datatypes must match, because the client must know what datatype to expect and this can't be changed on a row by row basis...
to_char() could be used for your needs.