LEFT
Description
Returns a substring containing the specified number of characters from the beginning (left side) of the provided string. If num_chars exceeds the string length, the entire string is returned.
Syntax
LEFT(string, num_chars) -> String
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| string | String | Yes | The string to extract characters from. |
| num_chars | Integer | Yes | The number of characters to extract from the left. |
Examples
LEFT(CaseNumber, 3)
-- Returns the first 3 characters from CaseNumber.LEFT("Q2Report", 20)
-- Returns the entire string "Q2Report" since 20 exceeds its length.Tips
num_chars must be a non-negative integer. If num_chars is 0, an empty string is returned.