Re: [sqlalchemy] loss of precision when retrieving DATETIME2 column from MSSQL

2019-07-29 Thread peter bell
ry.select())) print('** StringDate TypeDecorator only applied to the first table in a union :') print(t_history.select().union(t.select())) On Thursday, 18 July 2019 21:42:16 UTC+3, Mike Bayer wrote: > > > > On Thu, Jul 18, 2019, at 1:27 PM, peter bell wrote: > >> It seems t

Re: [sqlalchemy] loss of precision when retrieving DATETIME2 column from MSSQL

2019-07-18 Thread peter bell
On Thursday, 18 July 2019 18:30:44 UTC+3, Mike Bayer wrote: > > > > On Thu, Jul 18, 2019, at 7:56 AM, peter bell wrote: > > You are correct - it seems the issue is in pyodbc > > > but the pyodbc issue was fixed over a year ago. It seems that you > would like to retr

Re: [sqlalchemy] loss of precision when retrieving DATETIME2 column from MSSQL

2019-07-18 Thread peter bell
r than in SQLAlchemy. > > Simon > > On Thu, Jul 18, 2019 at 11:43 AM peter bell > wrote: > > > > > > I think the issue is more fundamental than that. > > > > Based on the output in my test program, the mssql DATETIME2 column is > being mapped

Re: [sqlalchemy] loss of precision when retrieving DATETIME2 column from MSSQL

2019-07-18 Thread peter bell
> Do you have the same problem if you use pyodbc directly, rather than > SQLAlchemy? > > Simon > > On Thu, Jul 18, 2019 at 10:44 AM peter bell > wrote: > > > > > > I am new to sqlalchemy and I am trying to retrieve results from a table > containing

[sqlalchemy] loss of precision when retrieving DATETIME2 column from MSSQL

2019-07-18 Thread peter bell
I am new to sqlalchemy and I am trying to retrieve results from a table containing a DATETIME2 column in a SQL Server database. A SQL Server DATETIME2 column includes a seven-digit number from 0 to 999 that represents the fractional seconds. When I retrieve the results of the table into