AT()

Advantage Concepts

Advantage Expression Engine function that returns the position of a substring within a character string

Syntax

AT(<cSearch>, <cTarget>) à nPosition

Parameters

<cSearch>  The character substring to be searched.

<cTarget>  The character string to be searched.

Return Values

AT() returns the position of the first instance of <cSearch> within <cTarget> as an integer numeric value. If <cSearch> is not found, AT() returns zero.

Remarks

AT() is a character function used to determine the position of the first occurrence of a character substring within another string. If you only need to verify whether a substring exists within another string, use the $ operator. To find the last instance of a substring within a string, use RAT().

Note Advantage Expression Engine functions can be used in expressions such as record filter expressions and index expressions. They are not necessarily scalars supported within SQL statements. For a list of supported SQL scalar functions, see Supported Scalar Functions.

Note Memo, binary, and image fields are not supported in this Advantage Expression Engine function. If memo, binary, or image fields are used with this expression engine function, the Advantage Expression Engine will be unable to evaluate the expression.

See Also

RAT()

SUBSTR()