Returns the position of one string value within another string value.
Syntax
POSITION(<StringExpression> IN <StringExpression>)
POSITION(<StringExpression>, <StringExpression>)
POS(<StringExpression> IN <StringExpression>)
POS(<StringExpression>, <StringExpression>)
<StringExpression> =
Type of:
CHARACTER|CHAR
CHARACTER VARYING|VARCHAR
GUID
CHARACTER LARGE OBJECT|CLOB
Returns
INTEGER
UsageThe POSITION function returns the position of one string within another string. If the search string is not present, then 0 will be returned.
Examples
SELECT *
FROM Customers
WHERE (POSITION('COMPLAINT' IN UPPER(Notes)) > 0)
SQL 2003 Standard DeviationsThis function deviates from the SQL 2003 standard in the following ways:
Deviation
Details
Argument Separator
The use of a comma separator for the function arguments is an ElevateDB extension.
POS
The POS version of the function is an ElevateDB extension.