LOOKUPTABLEVALUE2_DEFAULT

Syntax

LOOKUPTABLEVALUE2_DEFAULT (table_name, expression, default_value)

Description

Takes a value in column 1 of the named lookup table to find the value in column 2.

Arguments

table_name The name of the lookup table.
expression A value in column 1 of the named lookup table. The value can be any string expression.
default_value The value to insert if no there is no matching value in column 1.

Returns

Either:

Remarks

If the lookup value or the value being looked up is a NULL, the value is converted to its native data type, and then, if necessary, converted to a string before it is used in the lookup. Before the lookup occurs, if the source value is:

If the value in the expression argument is listed more than once in the lookup table, TIBCO Scribe® Online returns a row error.

Examples

If MyLookupTable contains the following data:

Column1 Column2

1

Manager

2

Vice President

3

Exec VP

4

CEO/Pres

LOOKUPTABLEVALUE2_DEFAULT ("MyLookupTable", "5", "UNKNOWN")

Returns: "UNKNOWN"

For the same lookup table:

LOOKUPTABLEVALUE2 ("MyLookupTable", "3" , "UNKNOWN")

Returns: Exec VP

Related Topics

Lookup Tables

Lookup Functions

LOOKUPTABLEVALUE1

LOOKUPTABLEVALUE1_DEFAULT

LOOKUPTABLEVALUE2