Returns the number of times one string value is present within another string value.
Syntax
OCCURS(<StringExpression> IN <StringExpression>)
OCCURS(<StringExpression>, <StringExpression>)
<StringExpression> =
Type of:
CHARACTER|CHAR
CHARACTER VARYING|VARCHAR
GUID
CHARACTER LARGE OBJECT|CLOB
Returns
INTEGER
UsageThe OCCURS function returns the number of occurrences of one string within another string. If the search string is not present, then 0 will be returned.
Examples
SELECT *
FROM Customers
WHERE (OCCURS('COMPLAINT' IN UPPER(Notes)) > 0)
SQL 2003 Standard DeviationsThis function deviates from the SQL 2003 standard in the following ways: