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.

Internal functions<br />

overlay ('Goodbye' placing '' from 4 for 3) -- returns 'Gooe'<br />

overlay ('Goodbye' placing '' from 4 for 20) -- returns 'Goo'<br />

overlay ('' placing 'Hello' from 4) -- returns 'Hello'<br />

overlay ('' placing 'Hello' from 4 for 0) -- returns 'Hello'<br />

overlay ('' placing 'Hello' from 4 for 20) -- returns 'Hello'<br />

Warning<br />

When used on a BLOB, this function may need to load the entire object into memory. This may affect performance<br />

if huge BLOBs are involved.<br />

See also: REPLACE()<br />

Available in: DSQL, PSQL<br />

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

PI()<br />

Description: Returns an approximation of the value of #.<br />

Result type: DOUBLE PRECISION<br />

Syntax:<br />

PI ()<br />

Important<br />

If the external function PI 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: <strong>2.1</strong><br />

POSITION()<br />

Description: Returns the (1-based) position of the first occurrence of a substring in a host string. With the<br />

optional third argument, the search starts at a given offset, disregarding any matches that may occur earlier in<br />

the string. If no match is found, the result is 0.<br />

Result type: INTEGER<br />

Syntax:<br />

POSITION ()<br />

149

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

Saved successfully!

Ooh no, something went wrong!