This section describes how to use the SubTables
parameter to retrieve data from a sub-table.
To retrieve data from a sub-table
[FetchTasks]
section.Use the SubTables
parameter to specify the name of a new section in the configuration file. The new section will contain parameters that instruct the connector to extract data from the sub-table. For example:
[ExampleDatabase] ConnectionString=... SQL=select * from orders PrimaryKeys=OrderID Template=template.tmpl SubTables=Customers
Create the new section, and set the following parameters.
Template
|
The path to a template file. The template file defines how the data extracted from the table is indexed into IDOL Server. |
SQL
|
A SQL statement to retrieve the information from the sub-table. |
For example:
[Customers] Template=customers.tmpl SQL=select * from Customers where CustomerID=@CustomerID
The connector runs this query for every row returned by the main SQL statement (select * from orders
). The connector automatically replaces @CustomerID
with the CustomerID
retrieved from the main table (orders
).
|