Name

DB.DBA.BAG_OR_NULL_AGG — Returns a vector of passed values.

Synopsis

vector DB.DBA.BAG_OR_NULL_AGG ( value_expression any );
 

Description

DB.DBA.BAG_OR_NULL_AGG returns a vector of passed values. Similar to DB.DBA.BAG_AGG() but returns NULL instead of an empty vector if no arguments were actually passed.

The order of items in the vector is not predefined and may vary from run to run.

Parameters

value_expression

Value of item for aggregation.

Return Types

Any. If no arguments were actually passed returns NULL instead of an empty vector.

Examples

Example 24.8. Simple Use

SELECT DB.DBA.BAG_OR_NULL_AGG (subquery.X)
FROM (SELECT X FROM ... ORDER BY X) as subquery