Creating a new query for a real-time report

Last Updated : Apr 30, 2015 |

Procedure

  1. Select Query from the Edit menu.

    The Query Select window is displayed.

  2. Select New.

    A Query Assistant window is displayed. For more information on this window, see Adding the database items and calculations for the SELECT portion of the query window.

  3. Select Real-Time Database.
  4. In the Table list, highlight the name of the table that include the database items that you want to include in the query. For real-time reports, you can select only one table name.
  5. Select Next.

    A Query Assistant window is displayed. For more information on this window, see Adding the database items and calculations for the SELECT portion of the query window.

  6. In either the Database Items or Calculations box, highlight the first database item or calculation that you will reference in the query.
  7. Select Add or double-click the item.

    The item is listed in the Query Items box.

  8. Repeat Steps 6 and 7 until all of the database items and calculation that you want referenced in the query are listed in the Query Items box.
  9. Select Next.

    A Query Assistant window is displayed. For more information on this window, see Choose functions for the SELECT items window.

  10. Highlight the first Query Item that you want to assign an aggregate function.
  11. Highlight the Function that you want to assign an aggregate function.
  12. Repeat Steps 10 and 11 until you have assigned Functions to the appropriate Query Items.
  13. Select Next.

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

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

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

  17. Select AND or OR, as appropriate.
  18. Repeat Steps 14 through 17 until you have completed the query.
  19. Select Test.

    CMS checks the syntax of the query and returns a message with any errors. For more information, see Appendix A: Error messages.

  20. Correct any of the errors detected in the test.
  21. Select Next.

    A Query Assistant window is displayed. Use this window to give your query a new name.

  22. In the Name text box, enter the name that you want to assign to the query you created.
  23. Select Done.