Filtering Data Using Wildcards

Objective

After completing this lesson, you will be able to apply the matches pattern operand in a query filter in a Web Intelligence document.

Wildcards in Query Filters

The matches pattern operator in Web Intelligence helps you filter data with pattern matching. Use it to find text that follows a specific structure when you do not know the exact value.

This operator uses two wildcard characters:

  • The underscore (_) matches a single character.
  • The percent sign (%) matches any sequence of zero or more characters.

For better performance, avoid starting your pattern with a wildcard (%). A leading wildcard causes the database to perform a full scan of its data, which can be slow.

Query filter uses Matches pattern to find customer names starting with SM% or matching SM_TH with explanations for each pattern.

Let's Summarize What You've Learned

  • Use the matches pattern operator to filter data based on specific text structures, not exact values.
  • The underscore (_) wildcard matches a single character; the percent sign (%) matches any sequence of characters.
  • Avoid starting patterns with a percent sign (%) to improve query performance and reduce database scan times.

Restrict Data Using Wildcards

Business Example

Your manager asks you to analyze the sales revenue for specific product categories within the eFashion training universe. Initially, focus on categories beginning with "Swea" to understand their performance. Later, refine your analysis to include categories with the letter "a" as the third character to uncover broader insights.