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

  1. Begin configuring a process that uses queries, such as Select, Segment, or Extract.
  2. 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.)

  3. Construct your query by creating an expression:
    1. To specify which field to query, click in the Field name cell. The Available fields list should appear. If the list does not appear, click in the Field name cell again. Expand the available fields until you see the one you want. Then select a field in the Available fields list by double-clicking it or highlighting it and clicking Use. When deciding which available field to use, you can highlight an available field and click Profile to see a list of field values.
    2. You can use the Derived fields button if you want to create or select an existing variable for querying.
    3. Click in the Oper cell, then double-click a comparison operator in the Operators list (such as =, <, >, Between).
    4. Click in the Value cell, then double-click a value. If no values appear, click Profile to see a list of field values. You can also double-click in the Value cell to edit the value directly.
      Note: If you do not see the expected list (Available fields, Operators, Values, For selected expresssion), try either single clicking or double clicking on a cell in the Expressions area.
    You now have an expression that consists of a field name, operator, and value, such as Status=Active.
  4. To add and combine multiple expressions, follow the guidelines below:
    1. 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.
    2. Build your next expression, consisting of a field name, operator, and value.
    3. 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').
    4. To reorder the selected expression, double-click Move up or Move down.
    5. To add a blank row below the selected expressions, double-click Insert.
    6. To delete the selected expression, double-click Delete.
  5. 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>.
  6. 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.

  7. (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.
  8. Click OK.