Populating a table control using an SQL query in a heritage coach (deprecated)
Use the Execute SQL option to retrieve data directly from
a data source.
Before you begin
Before using a SQL query to populate a Table control, be aware of the following:
- The Execute SQL option is only used for retrieval of data (insert, update, and delete operations on data are not allowed).
- The SQL query is run before the heritage coach is displayed, and only if the variable to which the table is bound has no current value. If you want to refresh the value every time the heritage coach is rendered, select the Reload option. For example, if the Service updates the value during the life of the runtime task, you would want to reload this value each time the heritage coach is rendered.
- The property names of your custom data structure must match the column names in the database
table that you want to query. When executing the SQL query, IBM® Business Automation Workflow uses these labels to match the values from
the columns to the correct rows in your heritage coach table. Note that the names are not
case-sensitive. If the property names do not match the column names, you can use column aliases in
your SQL statement to perform the correct matching. The following
example:
SELECT PRICE AS Cost, ITEM_NAME AS ItemNamereturns the value of the PRICE column to the Cost property in your custom data structure, displaying it in the column to which it is bound in the heritage coach. The value of the ITEM_NAME column is displayed in the Item Name column.
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15