My SQL Server returns 4 as the result of:
SELECT PATINDEX('%[*+-/]%', '|11.0000000000|123-|123456|1234-|5*+')
What am I doing wrong here? Isn't the first * or + or - or / until much later in the string than position 4??
Other times PATINDEX() will return 0 even when one of the chars is clearly present in the string.
I get the same result from SQL versions 8.00.2055 and 9.00.4035.00 (X64).
What am I specifying wrong?
Or does anyone know of a bug (and fix) for PATINDEX() in SQL Server?