Business Objects: Use Wildcards for Pattern Matching in Query Conditions


Use single- and multiple-character wildcards for pattern matching in query conditions when you don't know the exact word, phrase, or category you're seeking.

Wildcard Characters

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:

The Single-Character Wildcard

To look for the product category of either SHIRTS or SKIRTS, use the pattern S_IRTS. This pattern specifies that the values retrieved must:

The _ means there can be a single unspecified character between the S and the IRTS.

The Multiple-Character Wildcard

To look for any product category beginning 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.

Enter Wildcards for a Pattern Matching Prompt

A report that uses a predefined pattern matching condition will prompt you for either ...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 both the start and end.

Create 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:

Apply Wildcards to Query Filters

  1. In the Query panel, drag the object you want to filter by into the Query Filters pane.
  2. Select the Operator Type drop-down arrow, and select Matches pattern from the list.
  3. Select the filter definition text box and type the wildcard pattern you want to use.
  4. When you have entered all of the query filters and result objects you need, select Run Query.

If you want to use multiple matches:

  1. Create the first query filter using the steps above.
  2. Select Add nested filter, located at the far right on the query filters. This adds an OR nest in the query panel.
    creating nested filter
  3. Move the existing matching filter to the nest and then create a second matching filter in the nest (or move it to the nest).
    Tnested matching filters
  4. Now, the report results should reflect the wildcard you entered.