Databases Reference
In-Depth Information
String Manipulation
Function Name
Return Type
Description
Returns the numeric ASCII character value
for a standard character.
ASCII()
Int
Returns the ASCII character for a numeric
ASCII character value.
CHAR()
Char
Similar to PATINDEX() , returns the index
(character position) of the first occurrence
of a character string within another
character string.
CHARINDEX()
Int
Returns the numeric difference between
two character strings based on the consen-
sus Soundex values.
DIFFERENCE()
Int
Returns the leftmost X characters from a
character string.
LEFT()
VarChar
Returns the length of a character string.
LEN()
Int
Converts a character string to all lowercase
characters.
LOWER()
VarChar
Removes leading spaces from the left side
of a character string.
LTRIM()
VarChar
Like the CHAR() function, returns the
Unicode character for a numeric character
value.
NCHAR()
nChar
Returns the index (first character position)
for the first occurrence of characters
matching a specified pattern within another
character string. Wildcard characters may
be used.
PATINDEX()
Int
Returns a character string with square
brackets around the input value. Used with
SQL Server object names so that they can be
passed into an expression.
QUOTENAME()
nVarChar
(character or
Returns a character string with all
REPLACE()
binary types,
occurrences of one character or substring
depending on
replaced with another character or
input)
substring.
Returns a character string consisting of a
specified number of repeated characters.
REPLICATE()
VarChar
Returns a character string with all characters
in reverse order.
REVERSE()
VarChar
Search WWH ::




Custom Search