Salesforce

LIKE (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

LIKE (Magic xpa 3.x)

Determines whether a given character string matches a specified pattern.

Syntax:

string LIKE pattern

Parameters:

string: The string with which a pattern is matched.
pattern
: The pattern to be matched with the given string.

Returns:

A true value if the character string matches the specified pattern. A false value if the character string does not match the specified pattern.

Example:

'abcd' LIKE 'a*d' returns True
'abcd' LIKE 'a?d' returns False
'abc' LIKE 'a?c' returns True

Note:

A pattern can include regular characters and wildcard characters. During pattern matching, regular characters must exactly match the characters specified in the character string. Wildcard characters, however, can be matched with arbitrary fragments of the character string. Wildcard characters are:

'*' – Any string of zero or more characters.
'?' – Any individual character.

To search for character strings that include a wildcard character, a back slash (\) must precede the wildcard character.

When performing string comparisons with LIKE, all characters in the pattern string are significant.

See also:

The Online and Rich Client Samples projects (program BS05 and RBS05)

Reference
Attachment 
Attachment