mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:03:02 +01:00
Docs.
This commit is contained in:
parent
6a0b577152
commit
9f9d80f1b4
@ -408,6 +408,8 @@
|
|||||||
|
|
||||||
* Feature CORE-964
|
* Feature CORE-964
|
||||||
Aggregate function LIST (string concatenation)
|
Aggregate function LIST (string concatenation)
|
||||||
|
See also:
|
||||||
|
/doc/sql.extensions/README.list
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Dmitry Yemanov <dimitr at firebirdsql.org>
|
Dmitry Yemanov <dimitr at firebirdsql.org>
|
||||||
|
|
||||||
|
41
doc/sql.extensions/README.list
Normal file
41
doc/sql.extensions/README.list
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
SQL Language Extension: LIST
|
||||||
|
|
||||||
|
Function:
|
||||||
|
This function returns a string result with the concatenated non-NULL
|
||||||
|
values from a group. It returns NULL if there are no non-NULL values.
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
Oleg Loa <loa@mail.ru>
|
||||||
|
Dmitry Yemanov <dimitr@firebird.org>
|
||||||
|
|
||||||
|
Format:
|
||||||
|
|
||||||
|
<list function> ::=
|
||||||
|
LIST '(' [ {ALL | DISTINCT} ] <value expression> [',' <delimiter value> ] ')'
|
||||||
|
|
||||||
|
<delimiter value> ::=
|
||||||
|
{ <string literal> | <parameter> | <variable> }
|
||||||
|
|
||||||
|
Syntax Rules:
|
||||||
|
1) If neither ALL nor DISTINCT is specified, ALL is implied.
|
||||||
|
2) If <delimiter value> is omitted, a comma is used to separate
|
||||||
|
the concatenated values.
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
1) Numeric and datetime values are implicitly converted to strings
|
||||||
|
during evaluation.
|
||||||
|
2) The result value is of type VARCHAR(32765), so the LIST function
|
||||||
|
should be used carefully, as Firebird limits the maximum
|
||||||
|
result set width by 64KB.
|
||||||
|
3) Ordering of values within a group is implementation-defined.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
A)
|
||||||
|
SELECT LIST(ID, ':')
|
||||||
|
FROM MY_TABLE
|
||||||
|
|
||||||
|
B)
|
||||||
|
SELECT TAG_TYPE, LIST(TAG_VALUE)
|
||||||
|
FROM TAGS
|
||||||
|
GROUP BY TAG_TYPE
|
Loading…
Reference in New Issue
Block a user