SQL-J Language Reference
Page 75 of 121

LTRIM

LTRIM trims one or more instances of a leading character string, or any characters within the character string, from a character string expression.

LTRIM(CharacterExpression [ , trimCharacters ] )

A CharacterExpression is a CHAR, VARCHAR, or LONG VARCHAR data type, any built-in type that is implicitly converted to a string, or any Java data type that directly maps to a built-in type that is implicitly converted to a string.

LTRIM returns NULL if either CharacterExpression or trimCharacters evaluates to null.

If trimCharacter is not specified, it defaults to ' ' (blank). It can consist of multiple characters.

LTRIM Examples

-- returns 'asdf '
VALUES
LTRIM(' asdf ')

--returns 'df'
VALUES
LTRIM('asasdf', 'as')

-- returns 'df'
VALUES
LTRIM('asdf', 'sa')

-- returns 'asdf'
VALUES
LTRIM('asdf', 'fd')

-- returns '0'
VALUES
LTRIM(130, 13)