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.

Notes:<br />

External functions (UDFs)<br />

For more information about passing NULLs to UDFs, see the note at the end of this book.<br />

• Depending on how you declare it (see CSTRING note), this function can accept and return strings of up to<br />

32767 characters.<br />

• Before <strong>Firebird</strong> 2.0, the result type was CHAR(n).<br />

• In <strong>Firebird</strong> 1.5.1 and below, the default declaration used CSTRING(80) instead of CSTRING(255).<br />

• In <strong>Firebird</strong> 1.0.x, this function returned NULL if the input string was either empty or NULL.<br />

Library: fbudf<br />

Added in: 1.0 (Win), 1.5 (Linux)<br />

sdow<br />

Description: Returns the abbreviated day of the week from a timestamp argument. The returned abbreviation<br />

may be localized.<br />

Result type: VARCHAR(5)<br />

Syntax:<br />

sdow (atimestamp)<br />

Declaration:<br />

DECLARE EXTERNAL FUNCTION sdow<br />

TIMESTAMP,<br />

VARCHAR(5) RETURNS PARAMETER 2<br />

ENTRY_POINT 'SDOW' MODULE_NAME 'fbudf'<br />

See also: dow<br />

Library: ib_udf<br />

Added in: IB<br />

Better alternative: Internal function SIGN()<br />

sign<br />

Description: Returns the sign of the argument: -1, 0 or 1.<br />

Result type: INTEGER<br />

188

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

Saved successfully!

Ooh no, something went wrong!