Installation guide

Using custom database queries in Call Classifier rules 26-20
Chapter 26: Using the Call Classifier
Wave Global Administrator Guide
Merging multiple SQL data fields into a single result field
When querying a SQL database, you can merge two or more data fields into a single result field.
For example, if a customers address is split across several fields, you can merge them into one
result that can then display the full customer address in Call Notes associated with a call.
You can use the merge syntax when specifying a SQL Select statement in the Call Classifier or
when creating a stored procedure in the SQL database.
The syntax for merging fields is:
Field1 + Field2 <...+ Fieldn> AS NewField
where “NewField” is the result field that you then enter in
Result fields.
You can concatenate spaces, punctuation marks, vertical bars, and other characters in the syntax
string to separate the fields.
The following example concatenates an address from several fields into one result:
SELECT Street + ' ' + City + ', ' + State + ' ' + Zip AS Address FROM Table1 WHERE
Phone1 = '|CC_Input|'
You then enter “Address” in
Result fields.
Setting up a stored procedure or query in your database
If your Call Classifier rule executes a SQL stored procedure or Microsoft Access query, you
must create the stored procedure or query in your database before the Call Classifier can use it.
This section describes how to create a stored procedure using Microsoft SQL Server and a
database query using Microsoft Access. To create queries using other databases, refer to the
documentation for your database or the Microsoft Access documentation.
Note: This section does not apply to you if your Call Classifier rule executes a dynamic SQL
query, as described in “Using custom database queries in Call Classifier rules” on page 26-13.
Release 2.0
September 2010