Enter the SQL WHERE criteria window

최근 업데이트 : Apr 30, 2015 |

Use this Query Assistant window to define the SQL WHERE clauses that you want to use to retrieve data for the report. The SQL WHERE clause tells the CMS to retrieve the data defined in the SELECT box that matches the criteria defined in the WHERE box. The SELECT box specifies which columns of data to consider in the database tables. The WHERE box species which rows of data to consider in the database tables.

Tips using this window

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

If you want to create a report that will display data for multiple splits/skills or VDNs on multiple ACDs, you can enter MULTI_ACD in the WHERE clause, instead of entering each individual OR statement. This will only work if you have correctly set up the inputs for the multi-ACD report.

WHERE window field descriptions

This window includes the following fields.

Name

Description

SELECT box

Shows the Query Items that were defined on the previous windows, including the database items and calculations and any associated functions assigned to the items and the database table from which the database items and calculations are to be retrieved.

The information displayed in the SELECT box cannot be edited.

Operand1 box

Lists the database items and calculations that can be used in the WHERE clause.

Operator box

Lists the standard mathematical operations that can be used in the WHERE clause.

Operand2 box

Lists the database items, calculations, and inputs that can be used in the WHERE clause and as inputs for the input window.

WHERE box

Shows the current WHERE clause.

AND button

Places an AND before the currently-selected Operand1, Operator, and Operand2. If you place AND between clauses, then both of the clauses must be true in order for CMS to retrieve the SELECT data from the table.

OR button

Places an OR before the currently-selected Operand1 , Operator, and Operand2. If you place OR between clauses, then either of the clauses can be true in order for CMS to retrieve the SELECT data from the table.

New Input

Takes you to the Edit Inputs window, where you can add new input fields for the Report Input window. Any new inputs you add will display in the Operand2 box.

Test button

Allows you to test the query for basic SQL syntax errors.

The ACD operand is automatically added to the beginning of each WHERE clause.