if-then-else expression in SELECT list
From: Bill Duttweiler <billd_at_slb.com>
Date: 1996/07/30
Message-ID: <31FE2DD3.3847_at_slb.com>#1/1
Date: 1996/07/30
Message-ID: <31FE2DD3.3847_at_slb.com>#1/1
Using ACCESS/ODBC/JET I can use the 'iif()'
function in a SELECT list to do an if-then-else
test. I've tried using the ORACLE DECODE()
expression, but it doesn't allow conditions. For
example,
DECODE(A = B, TRUE, <true reuslt>, <false result>)
gives an error like "missing right parenthesis".
It just doesn't appear that DECODE() can handle
condition expressions.
Is there any way to do an if-then-else expression?
Thanks.
Bill