Home >> FAQs/Tutorials >> SQL Server FAQ

SQL Server FAQ - Character String Functions Supported by SQL Server 2005

By: FYIcenter.com

(Continued from previous topic...)

What Are the Character String Functions Supported by SQL Server 2005?

SQL Server 2005 supports 23 character string functions:

  • ASCII(char) - Returning the code value of a non-Unicode character.
  • CHAR(int) - Returning the non-Unicode character of a code value.
  • CHARINDEX(word, string, start_location) - Returning the location of the searched "word" in a string.
  • DIFFERENCE(string1, string2) - Returning an integer value that indicates the difference between the SOUNDEX values of two strings.
  • LEFT(string, length) - Returning a substring of "length" character from the left hand side.
  • LEN(string) - Returning the number of characters in the string.
  • LOWER(string) - Returning the same string with all upper case characters converted to lower case.
  • LTRIM(string) - Returning the same string with leading spaces removed.
  • NCHAR(int) - Returning the Unicode character of a code value.
  • PATINDEX(pattern, string) - Returning the location of the "pattern" in a string.
  • QUOTENAME(string, quote) - Returning the same string enclosed in "quote".
  • REPLACE(string, old, new) - Returning the same string with "old" replaced by "new".
  • REPLICATE(string, number) - Returning the same string repeated "number" of times.
  • REVERSE(string) - Returning the same string with all character positions reversed.
  • RIGHT(string, length) - Returning a substring of "length" characters from the right hand side.
  • RTRIM(string) - Returning the same string with trailing spaces removed.
  • SOUNDEX(string) - Returning a four-character (SOUNDEX) code to evaluate the similarity of two strings.
  • SPACE(length) - Returning a string of "length" space characters.
  • STR(number, precision, scale) - Returning a string representation of a numeric value.
  • STUFF(string, start, length, new) - Returning the same string with one part being replaced.
  • SUBSTRING(string, start, length) - Returning a substring.
  • UNICODE(nchar) - Returning the code value of a Unicode character.
  • UPPER(string) - Returning the same string with all lower case characters converted to upper case.

(Continued on next topic...)

  1. How To Concatenate Two Character Strings Together?
  2. What Happens When Unicode Strings Concatenate with Non-Unicode Strings?
  3. How To Convert a Unicode Strings to Non-Unicode Strings?
  4. What Are the Character String Functions Supported by SQL Server 2005?
  5. How To Insert New Line Characters into Strings?
  6. How To Locate and Take Substrings with CHARINDEX() and SUBSTRING() Functions?
  7. How To Concatenate Two Binary Strings Together?
  8. Can Binary Strings Be Used in Arithmetical Operations?
  9. How To Convert Binary Strings into Integers?
  10. Can Binary Strings Be Converted into NUMERIC or FLOAT Data Types?
  11. Can Binary Strings Be Converted into Character Strings?
  12. Can Binary Strings Be Converted into Unicode Character Strings?
  13. How To Convert Binary Strings into Hexadecimal Character Strings
  14. What Are Bitwise Operations?

Related Articles:

More...


Other Tutorials/FAQs:

More...


Related Resources:

More...


Selected Jobs:

More...