Name

DB.DBA.XQ_SEQUENCE_AGG — Creates an XQuery sequence object that consists of all values passed the the aggregate.

Synopsis

vector DB.DBA.XQ_SEQUENCE_AGG ( value_expression any );

Description

DB.DBA.XQ_SEQUENCE_AGG creates an XQuery sequence object that consists of all values passed the aggregate.

Parameters

value_expression

Values are "flatten" before being added to the sequence. It means that --- NULLs are not added at all.

If an XQuery sequence object is passed to the aggregate then all items of sequence are appended to the end of the accumulated result, one after other. Thus the aggregate of a sequence ('A', 'B'), a string 'C' and a sequence ('D', 'E', 'F') is a sequence ('A', 'B', 'C', 'D', 'E', 'F'), not something like (('A', 'B'), 'C', ('D', 'E', 'F')).

If an SQL vector is passed to the aggregate then every item of the vector is appended to result separately, and if an item is in turn a nested vector or a nested XQuery sequence then every sub-item is appended separately, in a recursive manner. So SQL vectors are "flattened" recursively.

If the argument of DB.DBA.XQ_SEQUENCE_AGG () is a narrow string or a wide string it is converted to UTF-8 before being added to the sequence. If an SQL vector contains a narrow or wide string then it is also converted to UTF-8. However if a narrow string is an item of an XQuery sequence then it is treated as UTF-8 and not subject to encoding.

Return Types

Any