Using User-Defined Parameters in your query
Because of the limitations of ODBC Parameters, AQT provides a more powerful mechanism for parameters.
User-defined parameters have the following features:
- you can set a parameter to a value such as the current date or a value returned by a query
- you can prompt the user to select a value from a drop-down list, or date / file picker
- parameter values stay in effect for your AQT session (or across AQT sessions) so do not need to be re-prompted
AQT parameters are a feature specific to AQT and are not recognized by other query tools.
Example
In this example:
- we define a parameter workdep and prompt the user to provide a value for it
- the user can select a value from a drop-down list
- the parameter value is referenced in the query by preceding it with a $