Define Replaceable Parameters

When defining an extended query (selection or data), you can define replaceable parameters. A replaceable parameter is a “place holder” for a value of a WHERE condition that is completed at runtime. You can use a replaceable parameter for any value that you want to vary in your query. Doing so lets you easily reuse the same query with different values for the WHERE clause.
dm
When defining an extended query (selection or data), you can define replaceable parameters. A replaceable parameter is a “place holder” for a value of a WHERE condition that is completed at runtime. You can use a replaceable parameter for any value that you want to vary in your query. Doing so lets you easily reuse the same query with different values for the WHERE clause.
Follow these steps:
  1. Place an ampersand (&) in front of the name in the Where Clause on the SQL Selection panel. The name can be a maximum of eight characters and is delimited by a space, comma, quote, or left parenthesis. The value entered at runtime replaces this name. If no value is specified, an error occurs.
    You can enter the same replaceable parameter name in a query multiple times to have the same value substituted in more than one locationPress Enter.
    The following processing occurs:
    • Column Abbreviations are automatically expanded. They are independent of entering replaceable parameters.
    • Replaceable parameters are defined. If they are placed in quotes, when runtime values are entered, they are also placed in quotes.
    When the query is executed, a special runtime panel appears (Replaceable Parms) for entering the values.
  2. Specify up to 255 characters for the value to be substituted in the next to the parameter name and press Enter.
    If you are entering character data and the replaceable parameter is not defined in quotes, enter the character data in quotes.
    Processing begins. All replaceable parameters defined in a query appear down the left side of the panel.
  3. Specify a value for each replaceable parameter and press Enter.
    You can review your SQL statement before entering values using the SQL primary command.
    When the query is executed, the Replaceable Parameters panel appears. If you have entered an action code of S and an extended query name that contains replaceable parameters, this panel appears when you press Enter. This lets you easily rerun the same query with different values.
    If you designate a query with replaceable parameters as a default query, then whenever you execute the owning function, you first receive the Replaceable Parameters panel. This can be confusing because the requested function was not performed (for example, table selection list). If this is too confusing, do not make extended queries that contain replaceable parameters defaults.