Previous Topic: Add Query ColumnsNext Topic: Set Query Filters


Add ODBC Query Columns

To create a query, write a statement that retrieves the event information you want from the target ODBC database. The query design wizard helps automate this process.

Follow these steps:

  1. Open the query design wizard.
  2. Enter the name and tag, if not already specified, then advance to the Query Columns step.
  3. (Optional) Select the Unique events only check box.
  4. Set the columns you want to query by clicking the Add button at the top of the pane. Columns appear in the selected display in the order in which they are added. You can alter the order using the up/down buttons at the top of the pane.
  5. Select the settings you want for each column, including:
    Display Name

    Lets you enter a different name for the column, when it is displayed in Table or Event Viewer format. If you enter no Display Name, the native field name is used as the column name.

    Function

    Lets you apply a function to the column values. Each field belongs to one of three types; string, integer, or datetime. When you add a column to a query, CA User Activity Reporting Module displays only those functions that apply to its type.

    Group Order

    Sets the query display to show the selected columns grouped by the selected attribute. For example, you can set the query to group events by source name. You can control the order in which it is applied to various columns. If the first column values are identical, the second are applied. For example, you can group multiple events from the same source by username.

    Sort Order

    Controls the order in which the selected value is sorted. You can control the order in which it is applied to various columns. If the first column values are identical, the second are applied.

    Descending

    Sets the column values to display in descending order (highest to lowest value).

    Not Null

    Controls whether the row is displayed in a table or Event Viewer if it contains no value. Selecting the Not Null check box removes the row from the query result if it contains no displayable value.

    Visible

    Controls whether the column is displayed in a table or Event Viewer. You can use this setting to make the column data available in the details view without showing it in the display itself.

    Note: If you select any function other than TRIM, TOLOWER, TOUPPER or a Group Order setting for a column, you must also select the same setting for other columns. Otherwise, CA User Activity Reporting Module displays error messages.

  6. (Optional) Use the up and down arrows at the top of the Selected Columns pane to change the column order as needed.
  7. Click the appropriate arrow to advance to the Query Design step you want to complete next, or click Save and Close.

    If you click Save and Close, the new query appears in the Query List. Otherwise the Query Design step you choose appears.

More information:

How to Create a Query

Add Query Columns