Creating queries with Point & Click
These instructions explain how to create a query using the default Point & Click method in a process configuration dialog. You can also follow these instructions to edit a query. Note that selecting a new item from the Select based on list removes the existing query.
Procedure
- Begin configuring a process that uses queries, such as Select, Segment, or Extract.
- Access the query option for the process:
- For a Select process, choose Select <audience> IDs with on the Source tab.
- For a Segment process, choose Segment by query on the Segment tab. Then either create a new segment or edit an existing segment. In the New segment or Edit segment dialog, choose Select IDs with.
- For an Extract process, choose Select <audience> IDs with on the Source tab.
The Point & Click query builder is displayed by default. (The button below the Expression field says Text Builder.)
- Construct your query by creating an expression:
You now have an expression that consists of a field name, operator, and value, such as Status=Active.
- To add and combine multiple expressions, follow the guidelines below:
- To add another expression, click the And/Or cell, then double-click AND or OR in the Values list to indicate how to combine the expressions.
- Build your next expression, consisting of a field name, operator, and value.
- To add parentheses to control evaluation order, double-click the Field Name in any row to display the For selected expression list. In the list of expressions, double-click Add (...) to add a set of parentheses, Remove (...) to remove a single set of parentheses, or Clear all (...) to remove all of the parentheses in the selected expression. Parentheses allow you to group expressions when defining complex queries. For example, (AcctType = 'Gold' AND Rank = 'A') OR NewCust = 'Yes' is different from AcctType = 'Gold' AND (Rank = 'A' OR NewCust = 'Yes').
- To reorder the selected expression, double-click Move up or Move down.
- To add a blank row below the selected expressions, double-click Insert.
- To delete the selected expression, double-click Delete.
-
If your query includes a table field that has the same name as a Campaign generated field, you
must qualify the field name. Use the following syntax:
<table_name>.<field_name>
. -
Click Check syntax to confirm whether your query syntax is valid.
Checking the syntax does not put any load on the database server.
Campaign indicates whether the syntax contains any errors.
-
(Optional) Use Test query to see how many IDs the query returns.
A progress bar is displayed while the query is being tested. Close the progress window if you want to cancel the test. When testing is complete, Campaign indicates the number of rows the query returned.
Important: Global suppressions and cell size limits are not applied in Test Query counts. Test queries might also return non-normalized data. To obtain an accurate result count, test run the process. - Click OK.