Using different SQL queries as data source
Specify a different SQL query as a database data source.
- Add an INITIALIZE DATA SOURCE command to your rule procedure in the appropriate location.
-
In the Comment field, enter any comments you want to include for the command you are defining.
Note: Comments are only written to the rule procedure; use this field to describe or explain the purpose of the command you are defining.
- In the Data Source field drop-down list, select the Database data source variable you want to initialize.
-
In the SQL field, enter the SQL query text.
Note:
- The SQL text must be a Java string expression enclosed in double-quotes (").
- You can edit the string expression using the dynamic content available in any string expression in Rule Procedure.
-
The SQL must be composed exactly as the Database Management System requires-e.g., text literals and dates must be enclosed in double-quotes.