String Operators

I am going to press on with my series of very short articles or tidbits on Transaction SQL Operators. An operator is a symbol specifying an action that is performed on one or more expressions. I will exploring the String Operators today. These operators can be broken down into two categories: concatenation and pattern matching. Out of the two operators, pattern matching is the most complex. Transaction SQL has both a simple and compound version of the concatenation operator. This operator takes two strings and combines them into one. Please…

String Functions – PATINDEX()

I am going to continue my series of very short articles or tidbits on Transaction SQL string functions. I will exploring the PATINDEX() function today. The PATINDEX() function takes a search pattern to find and a expression to search as input parameters. It returns the first position in which the search pattern was found. Unlike the CHARINDEX() function, wild card characters such as %, _, and ^ can be used used to define the pattern. In a nutshell, it is a fuzzy match that is performed. The following example is…