Editing an existing real-time or historical query

Last Updated : May 18, 2015 |

About this task

Complete the following steps from the Report Designer Design Mode window.

Procedure

  1. Select Query from the Edit menu.

    The Query Select window is displayed.

  2. In the Queries box, highlight the name of the query you want to edit.
  3. Select Edit.

    A Query Assistant window is displayed. The Database Items and Calculations that are already included in the query are listed in the Query Items list.

  4. Do one of the following:

    If you want to…

    Then…

    Add database items or calculations to the Query Items list

    Select Add.

    Remove a database item or calculation from the Query Items list

    Highlight the item in the list and then select Remove=.

    Edit a database item or calculation on the Query Items list

    Highlight the item in the list and then select Edit.

    For example, to edit an item, create a custom calculation in the edit box. For instance, you may add callsoffered - to the abncalls item, so that the item would then read callsoffered - abncalls. That is the calculation that would be available for you to use in the query.

  5. Repeat Step 4 until all of the database items and calculations that you believe will be referenced in the query are listed in the Query Items box.
  6. Select Where.

    A Query Assistant window is displayed. For more information, see Enter the SQL WHERE criteria window.

  7. In the Operand1 box, highlight the first database item or calculation that you want considered in the WHERE clause.
  8. In the Operator box, highlight the appropriate operation.
  9. In the Operand2 box, highlight the second database item or calculation that you want considered in the WHERE clause.

    For example, if you want the report to select the data from the table when the number of ACDCALLS is greater than the number of ACWINCALLS, you would select Abncalls in the Operand1 box, the > sign in the Operator box, and ACWINCALLS in the Operand2 box.

  10. Select AND or OR , as appropriate.
  11. Repeat Steps 7 through 10 until you have completed the query.

    You can add your own text in the WHERE clause, such as parenthesis and numbers, by placing your cursor where you want the text to display and enter in the text.

  12. Select Test.

    CMS checks the syntax of the query and returns a message with any errors.

  13. Correct any of the errors detected in the test.
  14. Select Save.

    The changes to the query are saved and the Query Select window is displayed.