RIGHT
Description
Returns a substring containing the specified number of characters from the end (right side) of the provided string.
Syntax
RIGHT(string, num_chars) -> String
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| string | String | Yes | The original string. |
| num_chars | Integer | Yes | The number of characters to extract from the left. |
Examples
RIGHT("Q2Report", 10)
-- Returns the entire string "Q2Report" since 10 exceeds its length.RIGHT(Phone, 4)
-- Returns the last 4 characters of the Phone field.Tips
num_chars must be a non-negative integer. If num_chars is 0, an empty string is returned.