The variable format supports setting a default value, data type and a few options as in the following example:
|name||Required||Required. This is the name that appear in the prompt window. If multiple variables in a script have the same name, the substitution dialog shows only one and the entered value will be applied to all variables with that name|
|value||null||The default value for the variable|
|The type of variable: String, Boolean, Integer, Float, Long, Double, BigDecimal, Date, Time and Timestamp. In addition DbVisualizer defines: BinaryData and TextData (for CLOB). This is used to determine how the data should be passed between DbVisualizer and the database server. If no type is specified, it is treated as a literal|
The options part is used to express certain conditions. Separate these with a whitespace
A few pre-defined DbVisualizer variables can be used anywhere in the SQL. These are replaced with actual values just before the SQL is sent to the DB server.
In an sql script, the name on the result set produced by the next SELECT statement can be set with the
@set resultset name command (see Using Client-Side Commands). This result set name is accessible through the variable
Variable Substitution in SQL statements
For variable processing to work in the SQL Commander, make sure the SQL->Enable Parameterized SQL main menu option is checked.