Search this blog

Saturday, June 6, 2009

SQL SERVER - String Functions

ASCII - Returns the ASCII code value of the leftmost character of a character expression.

CHAR - Converts an int ASCII code to a character.

CHARINDEX - Searches expression2 for expression1 and returns its starting position if found. The search starts at start_location.

DIFFERENCE - Returns an integer value that indicates the difference between the SOUNDEX values of two character expressions.

LEFT - Returns the left part of a character string with the specified number of characters.

LEN - Returns the number of characters of the specified string expression, excluding trailing blanks.

LOWER - Returns a character expression after converting uppercase character data to lowercase.

LTRIM - Returns a character expression after it removes leading blanks.

NCHAR - Returns the Unicode character with the specified integer code, as defined by the Unicode standard.

PATINDEX - Returns the starting position of the first occurrence of a pattern in a specified expression, or zeros if the pattern is not found, on all valid text and character data types. For more information,

QUOTENAME - Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier.

REPLACE - Replaces all occurrences of a specified string value with another string value.

REPLICATE -Repeats a string value a specified number of times.

REVERSE - Returns the reverse of a string value.

RIGHT -Returns the right part of a character string with the specified number of characters.

RTRIM - Returns a character string after truncating all trailing blanks.

SOUNDEX - Returns a four-character (SOUNDEX) code to evaluate the similarity of two strings.

SPACE - Returns a string of repeated spaces.

STR - Returns character data converted from numeric data.

STUFF - The STUFF function inserts a string into another string. It deletes a specified length of characters in the first string at the start position and then inserts the second string into the first string at the start position.

SUBSTRING -Returns part of a character, binary, text, or image expression. For more information about the valid SQL Server data types that can be used with this function

UNICODE - Returns the integer value, as defined by the Unicode standard, for the first character of the input expression.

UPPER - Returns a character expression with lowercase character data converted to uppercase.

No comments:

Post a Comment