Table of Contents

Search

  1. Preface
  2. XML Concepts
  3. Using XML with PowerCenter
  4. Working with XML Sources
  5. Using the XML Editor
  6. Working with XML Targets
  7. XML Source Qualifier Transformation
  8. Midstream XML Transformations
  9. Appendix A: XML Datatype Reference
  10. Appendix B: XPath Query Functions Reference

XML Guide

XML Guide

boolean

boolean

Converts a value to Boolean.

Syntax

boolean (
object
)
The following table describes the boolean argument:
Argument
Description
object
Numeric or character string datatype. Passes a number or string to test.

Return Value

Boolean.
The function returns a Boolean as follows:
  • A string returns TRUE if its length is not zero, otherwise it returns FALSE.
  • A number returns FALSE if it is zero or not a number (NaN), otherwise it returns TRUE.

Examples

The following example verifies that a name has characters:
boolean ( NAME )
The following table includes example arguments and return values:
NAME
RETURN VALUE
Lilah
TRUE
-
FALSE
The following example verifies that a zip code is numeric:
boolean ( ZIP_CODE )
The following table includes example arguments and return values:
ZIP_CODE
RETURN VALUE
94061
TRUE
94005
TRUE
9400g
FALSE

0 COMMENTS

We’d like to hear from you!