String FUNCTIONS Flashcards
ASCII
Returns the ASCII value for the specific character
CHAR
Returns the character based on the ASCII code
CHARINDEX
Returns the position of a sub string in a string
CONCAT
Adds two or more strings together
Concat with +
Adds two or more strings together
CONCAT_WS
Adds two or more strings together with a separator
DATALENGTH
Returns the number of bytes used to represent an expression
DIFFERENCE
Compares two SOUNDEX values, and returns an integer value
FORMAT
formats a value with the specified format
LEFT
extracts a number of characters from a string (starting at the left)
LEN
Returns the length of the string
LOWER
converts a string to lower-case
LTRIM
removes leading spaces from a string
NCHAR
returns the Unicode character based on the number code
PATINDEX
returns the position of a pattern in a string
QUOTENAME
returns a Unicode string with delimiters added to make the string a valid SQL server delimited identifier
REPLACE
Replaces all occurrences of a sub string within a string, with a new sub string
REPLICATE
repeats a string a specified number of times
REVERSE
reverses a string and returns the result
RIGHT
Extracts a number of characters from a string (starting from right)
RTRIM
removes trailing spaces from a string
SOUNDEX
returns a four-character code to evaluate the similarity of two strings
SPACE
Returns a string of the specified number of space characters
STR
Returns a number as string
STUFF
deletes a part of a string and then inserts another part into the string, starting at a specified position
SUBSTRING
extracts some characters from a string
TANSLATE
returns the string from the first argument after the characters specified in the second argument are translated into the characters specified in the third argument
TRIM
removes leading and trailing spaces (or other specified characters) from a string
UNICODE
returns the Unicode value for the first character of the input expression
UPPER
converts a string to upper-case