Group by Table Function

There are two versions of the "group by table" function: $TableGroup and $TableGroupC.
$TableGroup function can be used to create a value group based on value list from a database table and uses default connection.

The function has the following parameters:

  1. Group number. Positive integer.
  2. Table Name. String, identifier quotation not required.
  3. Column List. List of strings, comma delimited. Quotation not required.
  4. (optional) Use data from the table sequentially. 0 or 1, default is 0 (false). The first row will be used after the last if necessary.

Example: $TableGroup(1,City,Name,Country) - specifies table 'City' as data source and uses the first column 'Name'.
$Group(1,2) - refers to the second column 'Country'.

The second version ($TableGroupC) requires specified ODBC data source name and, optional, login (user name) and password.

The function has the following parameters:

  1. Group number. Positive integer.
  2. Predefined Data Source Name1. String. Use ODBC Administrator* to prepare or manage it.
  3. Login2. String, default is empty.
  4. Password. String, default is empty.
  5. Table Name. String, identifier quotation not required.
  6. Column List. List of strings, comma delimited. Quotation not required.
  7. (optional) Use data from the table sequentially. 0 or 1, default is 0 (false). The first row will be used after the last if necessary.

1 - use JDBC driver name for Java edition of the engine.
2 - use connect string for Java edition of the engine.

* you should use 32 or 64 bit version of the administrator depend on application version.

Note: function returns NULL value for empty table

Examples

$TableGroupC(1,MyDb,UserName,Password,City,Name,Country)