Subject Re: [firebird-support] udfs?
Author Helen Borrie
At 03:52 PM 27/08/2003 +0200, you wrote:
>Hello
>
>In mysql I use a function called date_sub that substract X days from a
>date.
>I can also use a function called Now() that returns the current
>date/time.
>These two functions I use in a sqlquery, here is the interesting part:
>
>[...] WHERE from_date > DATE_SUB(now(), interval 2 day) [...]
>
>that gives me all entries written from 2 days ago to present time.
>Are there any UDFs availible that I can use in a similar query for
>firebird?

You don't need UDFs for this:

WHERE FROM_DATE > CURRENT_DATE - 2
or
WHERE FROM_DATE > CURRENT_TIMESTAMP - 2

(depends on whether you need to include time-portion or not)


>Where can I find docs about all UDF's that are availible?

The convention in the Firebird community is to provide an annotated file of
declarations with every UDF library. Look for a file named something.sql,
usually located in the same dir as the library itself (where 'something' is
the same or close to the name of the shared lib). You'll find ib_udf.sql
and fbsql.sql with the standard Firebird UDFs. You'll find other libs for
download at the IBPhoenix site.

heLen