previous

Query Summary

In the Query step, you will define the SQL statement to retrieve the datasets or segments from the OPERA database. Select the Query button to open the Query Builder and configure the SQL statement to retrieve the dataset from OPERA. The Query Builder is a complex query tool that allows you to select meta data from a tree list and define conditional filters for the result set.

The SQL query will execute each time the Segment job runs in OPERA. The interval at which the Segment job will run is based on the schedule defined in the Schedule step of the wizard.

ocrm_segmentation_wiz_query_summary

Configure your SQL query and select Next to proceed to the next step in the wizard.

Query. The SQL query is displayed in this pane.

Button Functions

Previous. Select to return to the previous step in the wizard.

Next. Select to move to the next step in the wizard.

Query. Select to open the Query Builder tool and build the SQL query that will retrieve the dataset from the OPERA database.

Close. Select to exit the wizard.

Query Builder

Select the Query button to open the Query Builder and build your SQL query.

ocrm_segmentation_query_builder

On the Query Builder, select from the following buttons to build your query statement:

ocmm_query_builder_add_condition

Add Condition (Alt+1)

Add a new condition under the match all node. Opens a List of Fields (see screen below) from which the user can select. If "Match All" is the definition, all conditions under it must be matched for the record to be included.

Note: You can select the Toggle (Alt+5) button to toggle between "Match All" and "Match At Least One" definitions.

ocmm_query_builder_add_expression

Add Expression (Alt+2)

Add a user defined expression.

ocmm_query_builder_match_all

Match All (Alt+3)

Add another "Match All" definition.

ocmm_query_builder_match_at_least_one

Match At Least One (Alt+4)

Select to add a "Match At Least One" definition. Only one condition will need to be met in order for the record to be included.

ocmm_query_builder_toggle

Toggle (Alt+5)

Select to toggle between "Match All" and "Match At Least One" definitions.

ocmm_query_builder_copy

Copy (Alt+6)

Select to copy a Match node.

ocmm_query_builder_paste

Paste (Alt+7)

Select to paste a Match node.

ocmm_query_builder_cut

Cut (Alt+8)

Select to cut a Match node.

ocmm_query_builder_delete

Delete (Alt+9)

Select to remove a Match node.

Hint Editor

Select the Edit Hint button on the Query Builder to associate a hint with the code snippet.

ocmm_query_builder_hint_editor

Preview

Select the Preview button on the Query Builder to preview your SQL query.

ocrm_segmentation_query_builder_preview

List of fields

The List of Fields screen allows you to add fields to the SQL expression you are building.

ocrm_segmentation_query_builder_list_of_fields'

List of Fields

Field Search. Enter the name of a field or select the search button to search for an existing field.

Fields. Select to add fields to the SQL expression. You add fields to the expression by selecting a node to expand it and view the tree list and choosing a meta data element from the list.

User Defined Expression. Select to choose a user defined expression from the tree list. Users with the required permission will be able to create the expressions that are available in the tree list.