0% found this document useful (0 votes)
43 views3 pages

Essential String Functions Guide

The document outlines basic string functions including Len(), LEFT(), RIGHT(), SUBSTRING(), and CHARINDEX() for string manipulation. It also covers trimming and formatting functions like LTRIM(), RTRIM(), TRIM(), REPLACE(), and REPLICATE(), as well as case conversion functions UPPER() and LOWER(). Additionally, it mentions STRING_AGG() for aggregating multiple row values into a single string.

Uploaded by

twegrow9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views3 pages

Essential String Functions Guide

The document outlines basic string functions including Len(), LEFT(), RIGHT(), SUBSTRING(), and CHARINDEX() for string manipulation. It also covers trimming and formatting functions like LTRIM(), RTRIM(), TRIM(), REPLACE(), and REPLICATE(), as well as case conversion functions UPPER() and LOWER(). Additionally, it mentions STRING_AGG() for aggregating multiple row values into a single string.

Uploaded by

twegrow9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Basic String Functions

---------------------------------------------------------------------------------
Len()
Returns the length of a string (excluding trailing spaces)

LEFT()
Returns the left part of a string with the specified number of characters

RIGHT()
Returns the right part of a string

SUBSTRING()
Returns part of a string from a specified position

CHARINDEX()
Returns the position of a substring in a string

Trimming and Formatting


---------------------------------------------------------------------------------
LTRIM()
Removes leading spaces

RTRIM()
Removes trailing spaces

TRIM()
Removes both leading and trailing spaces

REPLACE()
Replaces all occurrences of a substring

REPLICATE()
Repeats a string a given number of times

Case Conversion
---------------------------------------------------------------------------------
UPPER()
Converts string to uppercase

LOWER()
Converts string to lowercase

String Aggregation
---------------------------------------------------------------------------------
STRING_AGG()

Combines values from multiple rows into a single string

You might also like