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

string

string

Converts a number or Boolean to a string.

Syntax

string (
value
)
The following table describes the argument for this function:
Argument
Description
value
Numeric or Boolean value. Passes a number or Boolean value.

Return Value

String.
Returns an empty string if no value is passed. Returns NULL if a null value is passed.
The string function converts a number to a string as follows:
  • If the number is an integer, the function returns a string in decimal form with no decimal point and no leading zeros.
  • If the number is not an integer, the function returns a string including a decimal point with at least one digit before the decimal point, and at least one digit after the decimal point.
  • If the number is negative, the function returns a string that contains a minus sign (-).
The string function converts a Boolean to a string as follows:
  • If the Boolean is FALSE, the function returns the string “false.”
  • If the Boolean is TRUE, the function returns the string “true.”

Example

The following expression returns a string from the numeric argument speed:
string( SPEED )
The following table contains example arguments and return values:
SPEED
RETURN VALUE
10.99
‘10.99’
15.62567
‘15.62567’
0
‘0’
10
‘10’
50
‘50’
1.3
‘1.3’
The following expression returns a string from the Boolean argument STATUS:
string( STATUS )
The following table shows example arguments and return values:
STATUS
RETURN VALUE
TRUE
‘true’
FALSE
‘false’
NULL
NULL

0 COMMENTS

We’d like to hear from you!