Creating queries with Text Builder

These instructions explain how to create a query using the Text Builder feature in a process configuration dialog. To edit an existing query, edit the text of the query directly in the query text box, after clicking the Text Builder button.

Procedure

  1. Begin configuring a process that uses queries, such as Segment, Select, or Extract.
  2. Access the query option for the process:
    • For a Select process, choose Select <audience> IDs With.
    • For a Segment process, choose Segment by query, then double-click a segment to edit it or click New segment to create a new segment. In the New segment or Edit segment dialog, choose Select <audience> IDs with, click Text Builder, then click Advanced.
    • For an Extract process, use Select records With.
  3. Click Text Builder to change from the default Point & Click query method.

    The Point & Click query columns are replaced by a query text box. Any existing queries are displayed in the text box.

  4. Choose an Input data source, and a data source to query from the Select Based On list. Your selections determine which fields can be used to build your query:
  5. Create your query by:
    • Selecting the field or table name(s) from the Available Fields list and double-clicking to enter them in the query text box. You can also click once then click <-Use to move it to the query text box.
    • Entering the required operators and values. To see the values of a selected field, you can click Profile.
    Note: Although you can enter field and table names directly in the query text box, selecting them from the list helps to avoid syntax errors. 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. To check the syntax of the query, click Check Syntax. Checking the syntax does not put any load on the database server.
  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. When you finish creating your query, click OK.

    The process configuration box closes and you return to the flowchart page in Edit mode.