PATINDEX Missing ESCAPE Clause - by Victor Lindsey

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 259534 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 2/21/2007 8:13:18 PM
Access Restriction Public


Unlike the LIKE and NOT LIKE expressions, PATINDEX cannot use the ESCAPE clause to form complex pattern expressions that involve use of some reserved wildcard characters.  For example "WHERE COL1 LIKE '%[()[\]{}<>]%' ESCAPE '\'" seems impossible to express within a PATINDEX function.
Sign in to post a comment.
Posted by Stan Segers on 10/20/2008 at 8:27 AM
Extend the request to CHARINDEX too.
Posted by Srini [MSFT] on 5/30/2007 at 2:02 PM
    Thanks for the feedback about PATINDEX functionality. We are in the process of looking through all possible enhancements for the future releases of SQL Server and we will conisder enhancing the PATINDEX to support escape clauses as part of these enhancements. Once again thanks for the feedback and it is very much appreciated.

-- srini acharya
Program Manager, Relational Engine