|
The Query Analzyer now supports parameterized scripts. From the query toolbar the user may
enable/disable the parameterized scripts. By enabling them, the user may have scripts with
defined parameters so that Aqua Data Studio will prompt for the values of the parameters
before executing the script. Parameters are defined by a leading "&".
- Simple parameter query -
Example: SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_ID = &id
- Parameter query in a quoted string
Example: SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_NAME = '\&name'
Parameters are also supported in server side comments. Client side and server side comments
may be defined in File->Options->Scripts for each database. If a parameter is defined in a
client side comment it will be ignored. Parameters in server side comments will be prompted
and replaced.
Parameters also support default values. Default values may be defined by appending an "="
and the value after the name of the parameter. Default values may be single quoted to support
values with spaces and special characters.
- Simple parameter query -
Example: SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_ID = &id=10
- Parameter query in a quoted string
Example: SELECT * FROM DEPARTMENTS WHERE DEPARTMENT_NAME = '\&name='Sales Dept''
|