Archive

Posts Tagged ‘string functions’

List of string functions in SQL server

November 16th, 2010 admin No comments

You can use the string functions to manipulate the string values in the result set. String functions are used with both char and nchar data types. The list below contains the set of string functions available in SQL Server 2005.

Read more…

Search for a pattern in sql server using patindex() and Charindex()

October 5th, 2010 admin 1 comment

 

Although these functions are not commonly used, these are really powerful in searching a pattern and returning the location of text/ string/ pattern. By understanding the functionality of both the string functions, we will be able to understand the difference as well.

PATINDEX()

The function searches for a pattern in a string / expression and returns the starting position of the first occurrence of the pattern. It works similar to the LIKE operator in any query.

Read more…