Re: if-then-else expression in SELECT list
From: Eric Mortensen <mortense_at_cibadiag.com>
Date: 1996/07/30
Message-ID: <31FE6705.27B_at_cibadiag.com>#1/1
Date: 1996/07/30
Message-ID: <31FE6705.27B_at_cibadiag.com>#1/1
Roya Mehrfar wrote:
>
> This is the syntax of the decode statement
> decode(A,B,<true result>, <false result>)
>
> that means if you select this decode and A=B you select the true
> result and if A<>B you select the false result.
The following is probably a better way to describe decode
decode(A,B,<return value of decode if A=B>,
c,<return value of decode if A=C>, ..., <return value of decode if no prior pair determined a return value for decode>)
One powerfull feature of decode is that you can place a decode statement inside of a return value section of decode
Eric Mortensen
mortense_at_cibadiag.com
Received on Tue Jul 30 1996 - 00:00:00 CEST