次の方法で共有


LEFT( ) Function

Returns a specified number of characters from a character expression, starting with the leftmost character.

LEFT(cExpression, nExpression)

Return Values

Character

Parameters

  • cExpression
    Specifies the character expression from which LEFT( ) returns characters.

  • nExpression
    Specifies the number of characters returned from the character expression. If nExpression is greater than the length of cExpression, all of the character expression is returned. The empty string is returned if nExpression is negative or 0.

    LEFT( ) is identical to SUBSTR( ) with a starting position of 1.

Example

CLEAR
? LEFT('Redmond, WA', 4)  && Displays Redm

See Also

AT( ) | AT_C( ) | ATC( ) | ATCC( ) | ATCLINE( ) | ATLINE( ) | LTRIM( ) | RAT( ) | RATLINE( ) | RIGHT( ) | RTRIM( ) | SUBSTR( ) | LEFTC( ) | RIGHTC( ) | SUBSTRC( )