A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Functions: String Functions

space()

The string function space() returns blanks. The number of blank characters to be returned is specified in the parameter "integer_expression".

Syntax of the String Function space()

    space ( integer_expression )
    

The parameter of the String Function space()

"integer_expression"
The parameter "integer_expression" can be a column name, variable or constant and must be of one of the datatypes tinyint, smallint or int.

Example for the String Function space()

    select "aaa"+space(4)+"bbb"
go
------
aaa    bbb

Returns a string with four blank characters between "aaa" and "bbb".

See also:

ASE T-SQL - Aggregate Functions,
ascii(),
char(),
char(n),
charindex(),
char_length(),
compare(),
difference(),
lower(),
ltrim(),
patindex(),
replicate(),
reverse(),
right(),
rtrim(),
sortkey(),
soundex(),
str(),
String Functions,
stuff(),
substring(),
to_unichar(),
uhighsurr(),
ulowsurr(),
upper(),
uscalar().