Previous Topic: LCASE Function--Convert to Lowercase

Next Topic: LEN Function--Return the Length of a String

LEFT Function--Return Part of a String

The LEFT function returns a specified number of characters of a string. If the string is shorter than the specified number of characters, the entire string is returned.

Syntax

The LEFT function has the following format:

LEFT(source_string, length)

Parameters

The LEFT function accepts the following parameters:

source_string (string)

length (number)

Return Value

The LEFT function returns a string.

Example

Return_value=LEFT('JuanJuan', 2)
Return_value='Ju'

Return_value=LEFT('JuanJuan', 10)
Return_value=('JuanJuan')

Return_value=LEFT('JuanJuan', 0)
Return_value=''

More information:

RIGHT Function--Retrieve Characters from a String

MID Function--Return Part of a String


Copyright © 2010 CA. All rights reserved. Email CA about this topic