Subject | Re: AW: [firebird-support] NOT in Firebird |
---|---|
Author | Mark Rotteveel |
Post date | 2013-07-04T12:57:50Z |
On Thu, 04 Jul 2013 14:40:30 +0200, Paul Vinkenoog <paul@...>
wrote:
Yet another way is to use DECODE
(http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-intfunc-decode.html
):
for example: DECODE(var1, 0, 1, 1, 0)
Mark
wrote:
> Olaf wrote:Totally forgot about that option ;)
>
>> great, exactly what I was looking for. Only 1 and 0 is possible.
>
> Then you can also do
>
> Var2 = 1 - Var1
>
> The outcome is the same, but perhaps this is more obvious than bitwise
> XORing with 1. And it might execute a wee little faster.
Yet another way is to use DECODE
(http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-intfunc-decode.html
):
for example: DECODE(var1, 0, 1, 1, 0)
Mark