WM_CONCAT

Syntax

WM_CONCAT
(
  expr  IN text
)
RETURNS text;

Overview

This aggregation function combines multiple text values in a group into a single string. It sequentially combines the input text values to create a single string.

The inner workings are as follows:

  • If the input value is NULL, exclude it from the aggregation.

  • When the first value is entered, a new state (string buffer) is created.

  • If a value is subsequently entered, the existing string is appended with a default delimiter (comma), followed by the value.

  • When aggregation is complete, the accumulated string is returned as the final result.

Parameters

Parameter
Description

expr

text type: the text value to aggregate.

null values are excluded from aggregation.

Example

Last updated