LEFT - Returning the First Character(s) in a String

  • Last update: May 30, 2025
  • Overview

    Syntax

    LEFT(Text, Character count)

    Returns the first character or characters in a text string, based on the number of characters you specify.

    Parameter 1

    Text

    Contains the characters to be extracted

    Parameter 2

    Character count

    The specified number of characters to be returned. The character count should be greater than or equal to 0.

    Return Value Type

    Text

    Notes

    Notes

    • The function supports two parameters. The first is of the text type. The second is of the numeric type and can be omitted.

    • If the character count is greater than the length of the text string, the LEFT() function returns all text. If omitted, the default value 1 is used.

    • If any parameter value is NULL, the result is NULL.

    Example

    For example, to extract the first seven characters of the Migration_Route field, add a New Calculation Column operator in the Data Transformation node, and input the formula LEFT(Migration_Route,7) as shown in the following figure.

    Click Data Preview to view the extracted substring in the new column, as shown in the following figure.

    3-3.jpg

    附件列表


    主题: Data Development - Scheduled Task
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy