Returns true if a specified string matches a specified skeleton string.

Syntax

LIKE(<skeleton expC>, <expC>)

<skeleton expC>

A string containing a combination of characters and wildcards. The wildcards are ? and *.

<expC>

The string to compare to the skeleton string.

Description

Use LIKE( ) to compare one string to another. The <skeleton expC> argument contains wildcard characters and represents a pattern; the <expC> argument is compared to this pattern. LIKE( ) returns true if <expC> is a string that matches <skeleton expC>. To compare the phonetic similarity between two strings rather than the character-by-character similarity, use DIFFERENCE( ).

Use the wildcard characters ? and * to form the pattern for <skeleton expC>. An asterisk (*) stands for any number of characters, including zero characters. The question mark (?) stands for any single character. Both wildcards can appear anywhere and more than once in <skeleton expC>. Wildcard characters in <skeleton expC> can stand for uppercase or lowercase letters.

If * or ? appears in <expC>, they are interpreted as literal, not wildcard, characters, as shown in the following example.

? LIKE( "a*d", "abcd" ) // Displays true

? LIKE( "a*d", "aBCd" ) // Displays true

? LIKE( "abcd", "a*d" ) // Displays false

LIKE( ) is case-sensitive. Use UPPER( ) or LOWER( ) for case-insensitive comparisons with LIKE( ). LIKE( ) returns true if both arguments are empty strings. LIKE( ) returns false if one argument is empty and the other isn't.