Tag Archives: String function

Delete and Insert a string into another string using STUFF function


STUFF() T-SQL string function is used to insert a string into another string by removing a part of string from it. The starting position and the length given in the argument is the location and length of the string to … Continue reading

Posted in SQL Server, T-SQL | Tagged , , , , , , | Leave a comment

Find the pattern in a string using PATINDEX() function


PATINDEX() function is used to find a pattern in the text and returns the starting position of the first occurrence in the text. There are two arguments in this function Pattern and character expression. Syntax PATINDEX ( ‘%pattern%’ , expression … Continue reading

Posted in SQL Server, T-SQL | Tagged , , , , , , | Leave a comment

Enclose String with Delimiter using QUOTENAME() T-SQL


QUOTENAME() function returns a Unicode string  of the user argument with the delimiter character. The delimiter can be a user defined quote character or a default quote character. The default Quote character is []. The character string of the quotename() … Continue reading

Posted in SQL Server, T-SQL | Tagged , , , , | Leave a comment

DIFFERENCE(T-SQL)


Difference() string function gives the difference between the SOUNDEX code of two character expressions. Function Syntax DIFFERENCE ( character_expression , character_expression ) Difference function returns integer value range from 0 to 4. We can use this value to find the similarity between … Continue reading

Posted in SQL Server, T-SQL | Tagged , , , , , , , , | Leave a comment

CHARINDEX(T-SQL)


CharIndex() is a transact SQL function. It helps us to search for a character expression in  another character expression. Syntax: CHARINDEX ( Character expression to Search , character expression [ , start_location ] ) or CHARINDEX (Character expression to Search … Continue reading

Posted in SQL Server, T-SQL | Tagged , , , , , , | 2 Comments