PATINDEX functions returns the location of a pattern in a string. The search is not case-sensitive.
syntax:PATINDEX( '%pattern% ', string )
The pattern that you want to find. pattern must be surrounded by % characters. Other wildcard characters can be used in pattern, such as:%
-- Allows you to match any string of any length (including zero length)_
-- Allows you to match on a single character[ ]
-- Allows you to match on any character in the [ ] brackets (for example, [aeiou] would match on a, e, i, o, or u characters)[^]
-- Allows you to match on any character not in the [^] brackets (for example, [^aeiou] would match on any character that is not a, e, i, o, or u characters)
refer this link for some examplehttp://sqlandme.com/2011/07/05/sql-functions-patindex/ Amatya, if this helps please login to Mark As Answer. | Alert Moderator