WebSphere Message Brokers
File: ak05870_
Writer: Bill Oppenheimer

Reference topic

This build: July 31, 2007 21:32:35

COALESCE function

COALESCE is a miscellaneous function that lets you provide default values for fields.

Syntax

The COALESCE function evaluates its parameters in order and returns the first one that is not NULL. The result is NULL if, and only if, all the arguments are NULL. The parameters can be of any scalar type, but they need not all be of the same type.

Use the COALESCE function to provide a default value for a field, which might not exist in a message. For example, the expression:
COALESCE(Body.Salary, 0)
returns the value of the Salary field in the message if it exists, or 0 (zero) if that field does not exist.
Related concepts
ESQL overview
Related tasks
Developing ESQL
Transforming a complex XML message
Related reference
Syntax diagrams: available types
Miscellaneous ESQL functions
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:32:35

ak05870_ This topic's URL is: