You can construct queries, rules, and programs that either consider or ignore blanks.
Example 1 - ignore blanks
You can ignore blanks when the operator is not equal to one of the following in the query builder, rulebuilder for dynamic content, and programs actions.
In addition to the criteria added to create the rule Birthday is not equal to one of the following, to ignore blanks you must add another operator that looks for is not blank.
- Select Birthday from the Data Field drop down list.
- Select is not blank from the Operator drop down list.
- Make sure the rules are connected with AND. (AND is the default setting.)
- Click Done.
Example 2
The screen below shows that the criteria for this example is Birthday and the Type is Date. In addition to the criteria added to create the rule [Birthday] is not in list, to consider blanks you must add another operator that looks for is empty.
- Select is empty from the Operator drop down list and click ADD.
- Then, connect the rules with OR.
Blank or null values in queries and classic queries
Null and blank values are handled differently in classic queries and queries, which causes queries with the same criteria to return different results.
The classic query builder and the query builder treat empty fields differently. To illustrate, let's include a field in the database called Product
, and have three contacts with values: product a, product b, and [nothing].
For Acoustic Campaign users that are familiar with the classic query builder, you know that the following query returns contacts that have a value in the product field that is not "product a". That means only the contact with product b qualifies.
With the query builder, this is not the same. The query below, which looks just like the query above, returns all contacts that don't have "product a", including blanks. That means that both the contact with product b and the [nothing] contact qualify
This is important to know when building queries against databases and within programs. After you decide what query builder you're using, and if you want to include blanks or not include blanks, now you can make sure you build a query that returns the results you want.
Comments
0 comments
Please sign in to leave a comment.