The LIKE Condition functions the same as the 'contains' and 'starts with' conditions in NetSuite saved searches depending on where the Wildcard (% or _) is placed.
LIKE condition; however, is case-sensitive.
> % matches any string of any length (including zero length)
> _ matches a single character
Example:
Consider the following list of Employee First Names:
Adam Kenny
Annie
Cathy Rose
Mary Ann
Catherine
Brad Anthony
Catheryne
CASE WHEN {firstname} LIKE 'Cat%' THEN 1 ELSE 0 END
>Returns 1 for Cathy Rose and Catherine then 0 for the rest.
CASE WHEN {firstname} LIKE '%An%' THEN 1 ELSE 0 END
>Returns 1 for Annie, Mary Ann. Brad Anthony then 0 for the rest.
CASE WHEN {firstname} LIKE '%ny' THEN 1 ELSE 0 END
>Returns 1 for Adam Kenny and Brad Anthony then 0 for the rest.
CASE WHEN {firstname} LIKE 'Cather_ne' THEN 1 ELSE 0 END
>Returns 1 for Catherine and Catheryne then 0 for the rest.
It is also possible to combine both patterns in a single condition.
Example:
CASE WHEN {firstname} LIKE '%An_%' THEN 1 ELSE 0 END
>Returns 1 for Annie, Mary Ann and Brad Anthony then 0 for the rest.
Note: The characters enclosed in the single quotations are case sensitive. For example, if the statement is CASE WHEN {firstname} LIKE '%an%' THEN 1 ELSE 0 END, it will return 0 for all entries as none of the names has 'an' in small case.