SQL Query and CMS Database Table Basics
CentreVu Report Designer Version 8 User Guide
About SQL Queries
18-4
Multiple WHERE
Clauses
18
To put two or more clauses in a statement, use
and
or
or
. Use
and
to
define two or more clauses where
CentreVu CMS finds only rows that
meet all conditions. For example, the following statement searches for
rows where splits had an average speed of answer greater than 30
seconds and abandons greater than 100.
Select rows where: ANSTIME/ACDCALLS > 30 and ABANDONS > 100
Use
or
to define two conditions where
CentreVu CMS finds rows that
meet either condition but not necessarily both. For example, the following
statement searches for rows where splits had too many abandoned calls
or too many extension-out calls.
Select rows where: ABANDONS>15 or
AUXOACWOUTCALLS>7
WHERE Clause
with a Range/List
Variable
18
If a variable name, as defined in the Define Input window, has been
assigned the Multi-Value option, your WHERE clause must use the
equals sign (=) with the variable name. In addition, if a variable name has
the Multi-Value option, the WHERE clause for that variable name should
appear in the
Select rows where
field before any WHERE clause
that does not have a Multi-Value variable.
If a variable name has the Multi-Value option and the WHERE clause for
that variable name appears in the
Select rows where
field after a
WHERE clause that does not have a Multi-Value variable, the report will
not show accurate data when you run it.
WHERE Clause
for Selecting
Rows from an
ACD
18
In your WHERE statement, Report Designer always includes a clause to
select the ACD (
ACD = $acd
)
If you use this default clause, you do not need to define the variable in the
Define Input window because CMS understands
$acd
to be the current
ACD. However, if you wish, you can define a different variable name for
the
ACD
database item so the user can specify the desired ACD(s) when
ordering the report (such as in Multi-ACD reports). You can also
hardcode the ACD in a WHERE clause, as in the following example.
Select rows where: ACD = 1
Summary of Contents for CentreVu Report Designer
Page 4: ......
Page 18: ...Introduction CentreVu Report Designer Version 8 User Guide Related Documents 1 8...
Page 102: ...Edit Inputs CentreVu Report Designer Version 8 User Guide Viewing the Input Window 6 16...
Page 198: ...Format Text CentreVu Report Designer Version 8 User Guide Formatting Text on the Report 15 4...
Page 264: ...Index CentreVu CMS R3V8 Upgrades and Migration IN 10...
Page 266: ......