POSITION: Returning the First Position of a Substring in a Source String

How to:

The POSITION function returns the first position (in characters) of a substring in a source string.

Syntax: How to Return the First Position of a Substring in a Source String

POSITION(pattern, string)

where:

pattern

Alphanumeric

Is the substring whose position you want to locate. The string can be as short as a single character, including a single blank.

string

Alphanumeric

Is the string in which to find the pattern.

The data type of the returned value is Integer.

Example: Returning the First Position of a Substring

WebFOCUS

Feedback