APPX Software Library

Chapter 4: SQL Language Elements

4.9.2.48 LTRIM function (ODBC compatible)

Syntax

LTRIM ( char_expression [ , char_set ] )

Description

The scalar function LTRIM removes all the leading characters in char_expression, that are present in char_set and returns the resultant string. Thus, the first character in the result is guaranteed to be not in char_set. If the char_set argument is omitted, the function removes the leading and trailing blanks from char_expression.

Example

SELECT name, LTRIM (addr, ' ')
     FROM  customer ;

Notes

  • The first argument to the function must be of type CHARACTER.
  • The second argument to the function must be of type CHARACTER.
  • The result is of type CHARACTER.
  • If the argument expression evaluates to null, the result is null.