Topics Map > University of Chicago > IT Services > Business Systems > Reporting Systems
Business Objects - Webi - Using Wildcards for Pattern Matching in Query Conditions
This article explains how to use single and multiple character wildcards for pattern matching in query conditions.
Wildcards are special characters that denote any single character or any number of characters. When entering a pattern match for a prompt (or a constant in the query), use the following wildcards:
- _ (underscore) for any single character
- % (percent sign) for any number of characters
Understanding the single-character wildcard
To look for the product categories of either SHIRTS or SKIRTS, use the pattern S_IRTS. This pattern specifies that the values retrieved must:
- Be six characters long
- Have S as the first character and IRTS as the final four
The _ means that there can be a single unspecified character between the S and the IRTS.
Understanding the multiple-character wildcard
To look for any product category that begins with the letter B, use the pattern B%. This pattern specifies that the values retrieved must have B as the first character. The % means that the B can be followed by an unspecified number of characters.
Entering Wildcards for a pattern matching (contains) prompt:
A report that uses a predefined pattern matching condition will display a prompt that asks for either for "...starting with" or "... contains". You can use wildcards in the text you enter for these prompts but remember that the "...starting with" prompt will have a multi-character wildcard appended to the end and the "...contains" prompt will have the multi-character wildcard appended to the start and end.
Creating a query filter with a wildcard
You can use wildcards as placeholders for partial pattern searches. When you create the query filter using a wildcard, you must use one of the following relational operators:
- Matches pattern: to find values that match the pattern you specify.
- Different from pattern: to find values different than the pattern you specify.
To apply wildcards to query filters
- In the Query panel, drag the object that you want to filter by into the Query Filters pane.
- Click the Operator Type drop-down arrow, and select Matches pattern from the drop-down menu.
- Click the filter definition text box and type the wildcard pattern you want to use.
- Click Run Query (if you are done entering query filters and result objects).
- Create the first query filter using the steps above.
- Click the Add nested filter button (at the far right on the query filters) This adds a OR nest in the query panel
- Move the existing matching filter to the nest and then create a second matching filter in the nest (or move it to the nest)
The report displays data reflecting the wildcard you entered.