Previous Topic: Variance populationNext Topic: Weekday


Verify

The verify function returns the position of the first character in a string value that does not occur in a verification string. If every character in the object string value occurs in the verification string, a zero is returned.

Syntax:

►►─┬─ VER ────┬─ (string, verification-string) ───────────────────────────────►◄
   └─ VERIFY ─┘

Invocation names:

VER
VERIFY

Parameters:

string

Specifies the string value on which the verify function is performed.

verification-string

Specifies the string value against whose characters the string value's characters are verified.

Example:

This example uses the verify function to return EMP-ID-0415 values that contain numeric values. The initial value of EMP-ID-0415 is 02B6.

select emp-last-name-0415 from employee
 where verify(emp-id-0415,'1234567890') ne 0

If EMP-ID-0415 contains only numbers and blanks, the verify function returns a zero. If EMP-ID-0415 contains any other characters, the function returns the position of the first character that is not in the verification string.

3