DATETIME2(7) not deploying correctly (11.4.0.1)

BlueBSHBlueBSH Posts: 25 Bronze 2
edited February 29, 2016 11:17AM in SQL Data Compare 11
I have two databases, both are running SQL Server 2008 (10.0.6241.0). I have columns that are storing data as DATETIME2 with a precision of 7, when comparing the two databases I get every so often a time that is off by a very small fraction of a second. If I deploy the exact time form DB1 to DB2, the time in DB2 is sometimes also off by a fraction of a second. and the values are not consistanly shown in SQL Data compare 11.4.0.1

For an example, I just synced DB1 to DB2 the same table and SQL Data compare is telling me there is 491 differences in the table... every single one of them is a DATETIME2(7) column...

DB1 according to SQL database compare the value is 2015-03-05 15:33:50.3469999
DB2 according to SQL database compare the value is 2015-03-05 15:33:50.3469998

almost the same but not quite.... that was even after a deployment script made this statement to update that exact row

PRINT(N'Update rows in [Journaling].[JournalEvents]')
UPDATE [Journaling].[JournalEvents] SET [EventDate]='2015-03-05 15:33:50.3469999' WHERE [EventID] = 279254
PRINT(N'Operation applied to 1 rows out of 491')

now the GUI is showing it's different but when I go into the databases and check the values it is showing even more different values...

DB1 in the actual DB: 2015-03-05 15:33:50.3470000
DB2 in the actual DB: 2015-03-05 15:33:50.3469999

Comments

Sign In or Register to comment.