case expression has no data type (all branches are NULL) Explanation: The result data type of a CASE expression is calculated from each of the result value expressions following the THEN clause. This CASE expression only has NULL which has no data type attributes. (Note that a missing ELSE clause also defaults to NULL.) User Action: If you want to use NULL, then use CAST(NULL AS some-dtype) to apply a data type to the NULL specification.