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

substring-before

substring-before

Returns the part of a string that occurs before a substring.

Syntax

substring-before (
string, substring
)
The following table describes the arguments for this function:
Argument
Description
string
String datatype. Passes the string to search.
substring
String datatype. Passes the substring to search for in the string.

Return Value

String.
Empty string if the substring is not found.
NULL if a value passed to the function is NULL.

Example

The following expression returns the number that occurs in a Third Street address:
substring-before ( ADDRESS, Third Street )
The following table contains example attributes and return values:
ADDRESS
RETURN VALUE
100 Third Street
100
250 Third Street
250
600 Third Street
600
NULL
NULL

0 COMMENTS

We’d like to hear from you!