Open topic with navigation

# SQL

The `SQL` parameter specifies the query sent to the database. The rows returned by the query are transformed into documents.

If you are writing a SQL command to extract data from a sub-table, you can use the @ character to substitute data from the main table. For example:

    [Example]
    ConnectionString=...
    SQL=select * from orders
    PrimaryKeys=OrderID
    Template=C:\Autonomy\ODBCConnectorCFS\template.tmpl
    SubTables=Customers

    [Customers]
    Template=C:\Autonomy\ODBCConnectorCFS\customers.tmpl
    SQL=select * from Customers where CustomerID=@CustomerID

The connector runs the sub-table query for every row that is retrieved from the main table. In this example, the connector replaces`@CustomerID` with the value of the `CustomerID` column from the main (`orders`) table.

NOTE:

If you want the connector to report the progress of synchronize tasks, the value of the `SQL` parameter (for the main table) must not include an ORDER BY clause.

Type: | String
Default: |
Required: | Yes
Configuration Section: | TaskName or FetchTasks
Example: | `SQL=select * from table`
See Also: | AddedAndUpdatedStatement DeletedStatement UseIncrementalStatements

© Copyright 2019 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm