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. XML Datatype Reference
  10. XPath Query Functions Reference

XML Guide

XML Guide

concat

concat

Concatenates two strings.

Syntax

concat (
string1, string2
)
The following table describes the arguments for this function:
Argument
Description
string1
String datatype. Passes the first string to concatenate.
string2
String datatype. Passes the second string to concatenate.

Return Value

String.
If one of the strings is NULL, concat ignores it and returns the other string.

Example

The following expression concatenates FIRSTNAME and LASTNAME:
concat( FIRSTNAME, LASTNAME )
The following table includes example arguments and return values:
FIRSTNAME
LASTNAME
RETURN VALUE
John
Baer
JohnBaer
NULL
Campbell
Campbell
Greg
NULL
Greg
NULL
NULL
NULL

Tip

The concat function does not add spaces to strings. To add a space between two strings, you can write an expression that contains nested concat functions. For example, the following expression adds a space to the end of the first name and concatenates first name to the last name:
concat ( concat ( FIRST_NAME, " " ), LAST_NAME )
The following table shows example arguments and return values:
FIRST_NAME
LAST_NAME
RETURN VALUE
John
Baer
John Baer
NULL
 Campbell
 Campbell
(includes leading space)
Greg
NULL
Greg

0 COMMENTS

We’d like to hear from you!