I have a database where the creator has used decided to use smallint
instead of bit
for a true/false scenario. False
is represented with 0
. True
is represented with -1
. I would like to translate this, preferably in a simpler syntax than CASE
. Is there any way I can do something like this:
SELECT (column == -1) 'value_as_bool'
FROM myTable
Which would (in most languages) translate the column back to a true/false column...