PRSQL9109001: PATINDEX with Brackets Returns Incorrect Index

ID Number: Q75880

1.11

OS/2

buglist1.11

Summary:

Problem ID: PRSQL9109001

SYMPTOMS

When using the PATINDEX function to find the position of the first

occurrence of a pattern in a specified column, the value returned

is one less than the actual starting position of the pattern.

CAUSE

The PATINDEX function does not return the correct index when the

pattern parameter contains the bracket ("[]") wildcard characters.

Please note that the PATINDEX function will work properly with the

"%" and "_" wildcard characters.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version

1.11. We are researching this problem and will post new information

here as it becomes available.