LEFT

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns the first n characters from a string.

  • <string>: The source string.
  • <n>: The number of characters to return. When negative, returns all but the last |n| characters.

Returns a text value that contains the leftmost characters.

  • When n is negative, returns all but the last |n| characters.
  • If n exceeds string length, returns the entire string.

Extract the first two characters.

Returns 'ab'.