Subject Re: [firebird-support] The predicate where table1.timestamp1 > coalesce(table2.timestamp1, table2.timestamp2, '1.1.2006') does not work since Firebird 2.1
Author Paul Vinkenoog
Hi all,

>>> PS: You can use specification "_timestamp" instead of CAST. I.e.
>>> coalesce(z.upd_tsc, z.create_tsc, _timestamp '1.1.2006')

>> Is it part of SQL standard?

> Yes - provided you don't try to use the charset introducer syntax by mistake ;-)

>> I don't remember seeing it anywhere in IB or FB docs.

> It was first documented in the v.2.1 release notes, under 'A Useful Trick with Date Literals' at PDF page 75 (or p. 65 if you are looking at the printed page numbers).

It's also mentioned under CAST in the 2.0 LangRef Update (very good source of information, those Release Notes ;-))

> However, Dmitry told me it has been available at least since Fb 1.0, possibly even IB 6.

Confirmed, I tried it in IB6 when documenting CAST.

Paul Vinkenoog