December 2002
Intermediate to advanced
928 pages
85h 29m
English
DECODE (expr,search,result[,search,result...] [,default])
Provides the capabilities of an inline IF statement. DECODE receives an input value and a list of up to 255 value/result pairs. DECODE then looks for the pair where the value matches the input. When that pair is found, DECODE returns the result from that pair as the result of the function. If no matching value is found, DECODE returns the default result.
Datatypes are controlled by the first search, result pair. The input expression and all search values are converted to the datatype of the first search value. The return value is converted to the datatype of the first result value.