SQL CASE Statement with Boolean | bront | 2017-03-06 07:26 |
Status: Closed | ||
Hi Josh, I am using PostgreSQL 9.3. I tried the following, but I'm still getting the "internal error while parsing." I am not sure I am formatting the CAST correctly. SELECT CASE WHEN Message.gender = 'M' then CAST(1 AS BIT) ELSE CAST(0 AS BIT) END as booleanTest FROM Message WHERE Message.messageId = '12345'; Thanks, bront |
||