VB6 IIf advantage

IIf is not an operator or a language construct, it’s a function, just like any other function such as Left. It will therefore evaluate all its arguments at all times, whereas with If you will only evaluate the correct branch. Example: denominator = 0 value = IIf(denominator = 0, 0, value / denominator) This will … Read more

ORACLE IIF Statement

Oracle doesn’t provide such IIF Function. Instead, try using one of the following alternatives: DECODE Function: SELECT DECODE(EMP_ID, 1, ‘True’, ‘False’) from Employee CASE Function: SELECT CASE WHEN EMP_ID = 1 THEN ‘True’ ELSE ‘False’ END from Employee