Performing advanced query tasks

The advanced tasks for queries include:

Note

When you add, modify, or remove a criterion, the query becomes inactive (all the groups to which it is assigned, will not re-evaluate their members anymore). You need to reactivate the corresponding query after adding, modifying, or removing a criterion.

Adding criterion to a query

  1. Select Queries in the left window pane.
  2. Select the query to which the new criterion is to be added in the left window pane.
  3. Select the Criteria tab in the right window pane.
  4. Select Edit> Add Criterion .
    The Select Criterion dialog box appears on the screen, displaying a list of available criteria.
  5. Select the desired criterion.
    This will define the contents of the drop-down lists in the Criterion Description box of the same dialog box.

  6. Define the operator by selecting the desired entry from the Operator list.
  7. Define a value in the Value box by either entering the desired value directly or:
    If the value is not a free text value but must be chosen from values registered in the database, such as the inventory type, this box is dimmed and the method described below must be used to enter the value.

    1. Click Find  next to the Value box.
      The Search Criteria dialog box appears on the screen.
    2. Select the operator according to which you want to launch the search from the Operator list.
    3. Enter the characters for the search into the Value box.

      If you are looking for a specific software, select Contains as the operator and enter the name completely or partially into the Value box.

      For example, if Contains Maker is defined, the search can return Filemaker , Framemaker , Pagemaker , and so on.

    4. Select the desired value from the results list.
    5. Click OK to continue.
  8. If you selected a criterion with a time parameter in step 5, enter the desired time in either the Value or the Timeframe text box.
    You can simply enter a date and time in the standard user defined format in the Value box or find the value via the search functionality described in the second set of substeps of step 7. To enter a dynamic time value, select the newly displayed Timeframe radio button. Enter then the desired time value into the text box next to it and select the corresponding unit from the drop down list to the right.

  9. If the result of the criterion definition is to be reversed, check the Reverse Criterion Result box.
    If the criterion defines for example to find all devices on which Microsoft IE is installed and this option is activated, the final result of this criterion will be all devices on which IE is not installed.

  10. Click Add  to add the defined criterion to the Selected Criteria list.

    Note

    You can add further criteria by repeating steps 5-9.

  11. Click OK to add all selected criteria to the query.
  12. Select active from the Query Status list.
    The selected criteria were added to the query selected in step 2 and the query was reactivated.

Modifying criterion of a query

  1. Select Queries in the left window pane.
  2. Select the desired free SQL query in the left window pane.
  3. Select the Criteria tab in the right window pane.
  4. Select the criterion to be modified in the table in the right window pane.
  5. Select Edit > Properties .
    The Select Criterion dialog box appears.
  6. Make the desired modifications in the Operator or Value boxes.
  7. Click OK to confirm.
  8. Select active from the Query Status list.
    The modifications of the criterion were saved and the query was reactivated.

Modifying a free SQL query

  1. Select Queries in the left window pane.
  2. Select the desired free SQL query in the left window pane.
  3. Select the SQL tab in the right window pane.
  4. Enter the your SQL query in the SQL Query field.

    Note

    Be aware of the following specifications when creating your free SQL query:

    • The query must start with SELECT .
    • The FROM must include the base table linked to the query type: if the type is Device, the query need to include the Device table.
    • The query cannot include the following operators: COUNT, SUM, AVERAGE, MAX, MIN, and SQL commands such as UNION, INTERSECT, EXCEPT, MINUS, and so on.
  5. Select Edit> Verify SQL .
    The database will verify your syntax and display the result in the following SQL Result . It will provide information about any errors it found, the detail level of which is based on your database system.
  6. Select Edit> Save Query .
    The modifications of selected free SQL query are now saved.

Removing criterion from a query

  1. Select Queries in the left window pane.
  2. Select the desired free SQL query in the left window pane.
  3. Select the Criteria tab in the right window pane.
  4. Select the criterion to be removed in the table in the right window pane.
  5. Select Edit> Remove Criterion.
    Confirmation dialog box appears.
  6. Click OK to confirm.
  7. Select active from the Query Status list.
    The selected criterion was removed and the query was reactivated.

Creating groups from a query

From a query, you can create the following groups:

  • Device group
  • Patch group
  • User group

To create a group, to which a query is assigned, the type of the query has to be Device, Patch, or User, respectively.

  1. Select Queries in the left window pane.
  2. Select the query for which you want to create a group in the right window pane.
  3. Go to Edit and select one of the following to create corresponding group:
    • Create Device Group .
    • Create Patch Group .
    • Create User Group .

The new group will be created with the same name as that of the query, directly under Device Groups, Patch Management, or User Groups respectively, in the left window pane. The query assigned to it has the status: active.

Was this page helpful? Yes No Submitting... Thank you

Comments