Query parameters usage and definition for custom queries:
Parameters are used in query text in next format - :parameter_name:
Parameter Types
Several types of query parameters are availableParameters are defined in the Query Parameters step in the New or Edit Query wizards. You can also create, edit, or delete parameters in custom queries. Parameters are used in the custom query text in the following format:
:parameter_name:
Info | ||
---|---|---|
| ||
You cannot open or view query parameters for core queries that are shipped with Eagle. |
Available parameter types include:
- Boolean.
Date. This parameter has the options of Absolute or Relative. Default value is "Send time as is":
Fancy Bullets - Absolute can be used if you need the same date for each query run.
- Relevant can be used if you need to use the date/time macros such as CD (Current Date).
- Default value for Absolute Date is the value that can be chosen using the Date/Time picker.
- Default value for Relevant Date is always the current moment when you press the Run query button.
- "Send time as is" means that the value will be used as defined, without correction based on the user's local time. If it is false, the time will be corrected to the database time zone.
Decimal.
- List
Provides the ability to select one or more values from the list. The Selection Mode option is used to define if only one value can be selected from the list or multiple values. All items in the list are predefined in this parameter type. Note that there is no validation for empty values, or duplicates, by design. - Query
Provides the ability to select one or more values from the list. The Selection Mode option is used to define if only one value can be selected from the list or multiple values. The difference from the List type parameter is that the values in the list are not defined strictly here, but selected from the database as query results. Other query parameters can be used in this parameter type. Query parameter relationships allow you to use different type parameters inside the Query type parameter. For example, in the Query Parameters step, you can edit one parameter to be related to another parameter that will be defined as query results based on your input for the first parameter. The result will be displayed in the Define Query Parameter dialog box as a list of values. - String.
Sample Parameter Types
Parameters can be entered as follows:
- User entered single parameter. Enter an integer or a character string.
- Date value. Specify the requested date via the Eagle date selector.
- Selection list. Select one or more entries from the check boxes.
Sample Single Parameter
The following is a sample user entered single parameter:
Sample Date Value Parameter
The following is a sample date value parameter:
Sample Selection List Parameter
The following is a sample selection list parameter:
With selection lists, you may check one, several, or all check boxes from the list.
One value:
Several values:
All values (by checking the top box):