21.10.2013 Views

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Available in: DSQL, PSQL<br />

Added in: <strong>2.1</strong><br />

Internal functions<br />

TANH()<br />

Description: Returns the hyperbolic tangent of the argument.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

TANH (number)<br />

• Due to rounding, any non-NULL result is in the range [-1, 1] (mathematically, it's ).<br />

Important<br />

If the external function TANH is declared in your database, it will override the internal function. To make the<br />

internal function available, DROP or ALTER the external function (UDF).<br />

Available in: DSQL, PSQL<br />

Added in: 2.0<br />

Changed in: <strong>2.1</strong><br />

TRIM()<br />

Description: Removes leading and/or trailing spaces (or optionally other strings) from the input string. Since<br />

<strong>Firebird</strong> <strong>2.1</strong> this function fully supports text BLOBs of any length and character set.<br />

Result type: VARCHAR(n) or BLOB<br />

Syntax:<br />

Examples:<br />

TRIM ([] str)<br />

::= {[where] [what]} FROM<br />

where ::= BOTH | LEADING | TRAILING /* default is BOTH */<br />

what ::= The substring to be removed (repeatedly if necessary)<br />

from str's head and/or tail. Default is ' ' (space).<br />

select trim (' Waste no space ') from rdb$database<br />

-- returns 'Waste no space'<br />

161

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!