Adapter for JDBC 10.3 | webMethods Adapter for JDBC Documentation | webMethods Adapter for JDBC Installation and User’s Documentation | Adapter Services | Configuring DynamicSQL Services | Configuring a DynamicSQL Statement
 
Configuring a DynamicSQL Statement
DynamicSQL uses ${INPUT_FIELD_NAME} to map a part of the SQL statement to the input field. At design time, the service template generates an input field with INPUT_FIELD_NAME. At run time, the service parses the statement and replaces the ${INPUT_FIELD_NAME} with the actual contents of the input field.
For example, consider the following DynamicSQL statement:
select * from table1 ${where}:
In this example, the service template will generate an input field for the {where} portion of the statement. Note that you do not type a semicolon (;) at the end of the SQL statement. Doing so will generate an exception at run time.
At run time, the {where} field is set to where col1>100:
The generated SQL statement will be Select * from table1 where col1>100.
A more extreme example would be to set the SQL field to "${sql}"; in this case, the entire SQL statement will be set through the input field sql.