Posted by Robert Klemme on 01/15/07 16:01
On 15.01.2007 16:34, schal wrote:
> hi Experts,
> what is the purpose writing a date in the following format:
>
> where x.event_date >= {ts '1980-01-01 00:00:00'}
> versus like this:
> where x.event_date >= '1980-01-01 00:00:00'
>
> what benifit does it add to later form of writing?
It's JDBC / ODBC escape syntax for timestamps.
http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/statement.html#999472
http://support.microsoft.com/?scid=kb%3Ben-us%3B142930&x=9&y=15
The former is converted by the ODBC / JDBC driver to some DB specific
binary representation of a timestamp while the latter undergoes
conversion in the DB. I'd generally use the escape syntax as it is more
portable and not affected by session parameters that affect date formatting.
Kind regards
robert
Navigation:
[Reply to this message]
|