LTRIM

Click to skip syntax diagram
Read syntax diagramSkip visual syntax diagram>>-LTRIM--(--expression--)-------------------------------------><
 

The LTRIM function removes blanks or hexadecimal zeros from the beginning of an expression. 46

expression
The arguments must be expressions that return a value of any built-in numeric or string data type. A numeric argument is cast to a character string before evaluating the function. For more information on converting numeric to a character string, see VARCHAR.

The data type of the result depends on the data type of expression:

Data type of expression Data type of the Result
CHAR or VARCHAR VARCHAR
CLOB CLOB
GRAPHIC or VARGRAPHIC VARGRAPHIC
DBCLOB DBCLOB
BINARY or VARBINARY VARBINARY
BLOB BLOB

The length attribute of the result is the same as the length attribute of expression. The actual length of the result is the length of expression minus the number of bytes removed. If all characters are removed, the result is an empty string.

If the first argument can be null, the result can be null; if the first argument is null, the result is the null value.

The CCSID of the result is the same as that of the string.

Example


46.
The LTRIM function returns the same results as: STRIP(expression,LEADING)