On Wed, 28 Jun 2017, Alexandre Peshansky wrote:
> SELECT *
> FROM [Dental].[dbo].[APR2010] WHERE [HIRE DATE] > {ts '2010-03-31 00:00:00.000'}
Or even just:
SELECT {ts '2010-03-31 00:00:00.000'};
...works. Learn something new every day...
However, I too get this result:
> select {ts '2017-02-24 10:56:12.790000'}
>
> Msg 241, Level 16, State 3, Line 1
> Conversion failed when converting date and/or time from character string.
...which, along with getting errors in Squirrel from generated INSERT
statements, supported my assumption that the {ts} format was an annoying
JDBC-ism.
As it turns out, MSSQL only allows three decimal places in the fractional
time part. This works:
SELECT {ts '2017-02-24 10:56:12.790'}
...so it isn't *exactly* as documented by 'Orrible for JDBC or MSFT for
ODBC.
Perhaps Squirrel needs to be made aware of the decimal places limit so
that it can generate working timestamps when querying from MSSQL?
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jh...@im... FALaholic #11174 pgpk -a jh...@im...
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
USMC Rules of Gunfighting #7: In ten years nobody will remember
the details of caliber, stance, or tactics. They will only remember
who lived.
-----------------------------------------------------------------------
6 days until the 241st anniversary of the Declaration of Independence
|