Finding Position of a Byte Sequence within the Column Referenced by an Image Locator

Use sp_drv_varbinary_charindex, which accesses the Transact-SQL function charindex.

Syntax

sp_drv_varbinary_charindex byte_sequence, locator, start, position

Input Parameters

  • byte_sequence – the byte sequence, of type varbinary, to search for.

  • locator – an image_locator that references the image column to search from.

  • start – an integer specifying the position from which to begin searching. The first position is 1.

Output Parameters

position – an integer specifying the starting position of search_string in the LOB column referenced by locator.

Result Set

None.