When running a query that coalesces a bit field, you should be able to supply a default value as follows:
SELECT COALESCE(aTable.someBitField, 1) FROM ...
In the above example, if 'aTable.someBitField' is NULL, 1 should be returned in the result set. Currently, an exception is thrown with the message 'incompatible data types in combination'. In a similar vein, the following query should return the same result set:
SELECT COALESCE(aTable.someBitField, TRUE) FROM ...
Both queries ran and failed against HSQLDB v2.2.9, running in memory with the following connection string:
Log in to post a comment.