Form Table Function

$Table function allows you to use a list of value from a database table. There are two usages of the $Table function. The first uses the default connection. The second allows you to use a custom ODBC data source name. Both have the following parameters:

  1. Table Name. String, identifier quotation not required
  2. Column Name. String, identifier quotation not required
  3. (optional) Use sequentially. Integer, default is 0 (false), 1 means true
  4. (optional) Where*. String, default is empty (use all data rows)

Optionally, three additional parameters are available:

  1. Predefined Data Source Name1. String. Use ODBC Administrator to prepare or manage it.
  2. (optional) Login2. String, default is empty.
  3. (optional) Password. String, default is empty.

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

Notes

* - the multiplatform amd Web editions of the pattern engine do not support 'where' clause. Please use $Query instead.
** - you should use 32 or 64 bit version of the administrator depend on application version.
Function returns NULL value for empty table

Examples

  1. $Table(Orders,OrderID) uses values from 'OrderID' column in the 'Orders' table.
  2. $Table(Orders,OrderID,1,OrderID>100) uses sequentially values greater 100 from 'OrderID' column in the 'Orders' table.
  3. $Table(Orders,OrderID,,,MyDsn,Admin,Password) uses 'MyDsn' data source with user name 'Admin' and password 'Password'.