Difference between revisions of "DbQuery"
Line 3: | Line 3: | ||
Queries an ODBC database. | Queries an ODBC database. | ||
{stub} | {stub} | ||
+ | |||
+ | == New to 4.0 == | ||
+ | |||
+ | In Analytica 4.0 (but not in Analytica 3.x and earlier), a local index can hold the record set. This means you can create a user-defined function that bundles several database query steps. For example: | ||
+ | |||
+ | Function DbFullTable( connectionStr,sql : atomic text ) | ||
+ | Definition: | ||
+ | Index Row := DbQuery(connectionStr,sql); | ||
+ | Index Column := DbLabels(Row); | ||
+ | DbTable(Row,Column) | ||
+ | |||
+ | This user-defined function returns the full relational table in a single call, using local indexes, Rows and Columns. |
Revision as of 19:04, 7 March 2007
Queries an ODBC database.
{stub}
New to 4.0
In Analytica 4.0 (but not in Analytica 3.x and earlier), a local index can hold the record set. This means you can create a user-defined function that bundles several database query steps. For example:
Function DbFullTable( connectionStr,sql : atomic text ) Definition: Index Row := DbQuery(connectionStr,sql); Index Column := DbLabels(Row); DbTable(Row,Column)
This user-defined function returns the full relational table in a single call, using local indexes, Rows and Columns.
Comments
Enable comment auto-refresher