VERIFY Function

Returns the position of the first character that is unique to an expression.

Category: Character
Returned data type: DOUBLE

Syntax

Arguments

target-expression

specifies any valid expression that evaluates to a character string that is to be searched.

Requirement Literal character strings must be enclosed in single quotation marks.
Data type NCHAR
See <sql-expression>
FedSQL Expressions

search-expression

specifies any valid expression that evaluates to a character string.

Requirement Literal character strings must be enclosed in single quotation marks.
Data type NCHAR
See <sql-expression>
FedSQL Expressions

Details

The VERIFY function returns the position of the first character in target-expression that is not present in search-expression. If there are no characters in target-expression that are unique from those in search-expression, VERIFY returns a 0.

Comparisons

The INDEX function returns the position of the first occurrence of search-expression that is present in target-expression where the VERIFY function returns the position of the first character in target-expression that does not contain search-expression.

Example

The following statement illustrates the VERIFY function:
Statements
Results
select verify('abc', 'ab');
3

See Also

Functions:
Last updated: February 23, 2017