Search for a pattern in a property using the format <property> (NOT) LIKE <pattern>.
Tip: To search for a string that includes an apostrophe literal, use the character twice. For example, if you are trying to do a pattern match for "Jonathan's folder", you would use two apostrophes: WHERE SI_NAME LIKE 'Jonathan''s%'
The pattern can include the following wildcard characters.
You can use a wildcard character as a literal character by enclosing it in brackets.
Symbol | Meaning |
---|---|
You can also use LIKE to do a search that is case
To finds objects whose description has "report" in it, regardless of the case, use the following syntax:
SELECT SI_ID, SI_NAME, SI_DESCRIPTION FROM CI_INFOOBJECTS WHERE SI_DESCRIPTION LIKE '%report%'
To create a case
SELECT SI_ID, SI_NAME, SI_DESCRIPTION FROM CI_INFOOBJECTS WHERE SI_DESCRIPTION LIKE '%[R][E][P][O][R][T]%'
For more information on using the LIKE operator, see Lesson 2d: Searching for reports.
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |