File: README.list

package info (click to toggle)
firebird3.0 3.0.13.ds7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 42,632 kB
  • sloc: ansic: 374,403; cpp: 319,973; sql: 14,691; pascal: 14,532; yacc: 7,557; fortran: 5,645; sh: 5,336; makefile: 1,041; perl: 194; sed: 83; awk: 76; xml: 19; csh: 15
file content (40 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 BLOB with SUB_TYPE TEXT for all cases
       except list of BLOB with different subtype.
    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