Using Wildcard Characters in Searches

You can use wildcard characters to search for items and field values using the search mechanisms provided by the SBM User Workspace. The wildcard search criteria in this section apply to the following search features:

Wildcard characters work differently in the Advanced Lookup Tool and the Relational Field Value Lookup. For details, refer to Advanced Lookup and Relational Field Value Lookup Wildcard Searches.

The following rules apply to wildcard characters in searches:

  1. Asterisks (*), percent signs (%), and underscores (_) serve as wildcard characters. Asterisk (*) and percent sign (%) wildcard characters match zero or more consecutive characters. The underscore (_) is a single wildcard character.
  2. Wildcard characters are automatically applied to the beginning and end of your search criteria. Items containing all of your search criteria are returned.
  3. You can override automatic wildcards by including at least one wildcard in your search criteria. Wildcard characters can be placed anywhere in your search text and might return different results depending on the location of your wildcard character. For example, *ed returns all items ending in ed, while ed* returns all items beginning with ed.
    Note: The underscore wildcard (_) does not override automatic wildcards.
  4. To find all items, type a (*) or (%) wildcard character or leave the box empty.
  5. Leading and trailing spaces are removed when you perform a search.
  6. Adding quotes around wildcards enables you to search for strings that contain the wildcard characters themselves. For example, "TS_SYSTEMSETTINGS" will match strings like "No entries found in TS_SYSTEMSETTINGS table" and not text like "No entries found in TS SYSTEMSETTINGS table".

For example:

For more further detail, review the following examples. Assume that your database contains the following data records:

TS_ID TS_TITLE
1 No entries in ts_systemsettings table
2 TS_SET_ATTRIBUTES column not found in TS_SYSTEMSETTINGS table
3 No entries found in TS_SYSTEMSETTINGS table
4 TS_SYSTEMSETTINGS
5 TS SYSTEMSETTINGS

The table below shows a user input example, the corresponding SQL that is passed to the database (the right part of the argument after LIKE), and the records that are returned as a result:

User Input Corresponding Part of SQL Query ('WHERE field LIKE '...') Records Returned
entries '%entries%' 1,3
No entries '%No%' and '%entries%' 1,3
"No entries" '%No entries%' 1,3
TS_SYSTEMSETTINGS '%TS_SYSTEMSETTINGS%' 1,2,3,4,5
"TS_SYSTEMSETTINGS" '%TS\_SYSTEMSETTINGS%' 1,2,3,4
No%entries 'No%entries' No items found (see rule 3 above)
%No%entries% '%No%entries%' 1,3
No*entries 'No%entries' No items found (see rule 3 above)
No"*"entries '%No*entries%' No items found