Returns a specified number of space characters.

Syntax

SPACE(<expN>)

<expN>

The number of spaces you want to return.

Description

SPACE( ) returns a character string composed of a specified number of space characters. The space character is ASCII code 32.

If <expN> is 0 or less, SPACE( ) returns an empty string.

To create a string using a character other than the space character, use REPLICATE( ).

Other than the syntactic difference of being a method instead of a function, the space( ) method behaves identically to the SPACE( ) function.