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 Helen Borrie
At 08:13 AM 25/01/2009, you wrote:
>Dimitry Sibiryakov wrote:
>> PS: You can use specification "_timestamp" instead of CAST. I.e.
>> coalesce(z.upd_tsc, z.create_tsc, _timestamp '1.1.2006')
>Does anyone know some documentation (or website) where one can read
>about other such stuff like this _timestamp shortcut?

...other such stuff like... NO - we tend to discover such tricks by accident.

>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). However, Dmitry told me it has been available at least since Fb 1.0, possibly even IB 6.