LEFT_SUBSTR

Retrieves the leftmost characters from a text string

Description

The LEFT_SUBSTR() function allows you to extract a specified number of characters from the beginning (left side) of a text string. This is useful for tasks like truncating text or extracting prefixes.

Syntax

LEFT_SUBSTR(text, number)

  1. text: The input text string from which you want to extract characters.

  2. number: The number (length) of characters to extract from the left side of the text.

Example

Table

ID
Text

1

Hello, World!

2

Example Text

3

Savant Analytics

Function

LEFT_SUBSTR(`Text`, 5)

Results

LEFT_SUBSTR (text)

Hello

Examp

Savan

Last updated