CHARINDEX function

Function

The CHARINDEX function returns a 64-bit signed integer containing the position of the first occurrence of the specified string in the large object column or variable parameter. For CHAR and VARCHAR columns, CHARINDEX returns a 32-bit signed integer position.

Syntax

CHARINDEXstring-expression, large -object-column )

Parameters

string-expression The string of up to 255 bytes, for which you are searching.

large-object-column The name of the LONG VARCHAR or LONG BINARY column or variable.

Usage

See also

See “CHARINDEX function [String]” in Chapter 4, “SQL Functions” in Reference: Building Blocks, Tables, and Procedures.