False difference on sql_variant column containing datetime2
Ian.Ferguson
Posts: 3
I have a database table with a sql_variant column which contains a datetime2 value.
When I compare identical copies of my database SQL Data Compare reports differences on the sql_variant column.
However, the columns *are* identical and I've used SQL_VARIANT_PROPERTY(column, 'BaseType') to confirm the column does indeed contain datetime2 values.
Any solutions?
I had the same problem with SQL Data Compare 11 but lived with it.
When I compare identical copies of my database SQL Data Compare reports differences on the sql_variant column.
However, the columns *are* identical and I've used SQL_VARIANT_PROPERTY(column, 'BaseType') to confirm the column does indeed contain datetime2 values.
Any solutions?
I had the same problem with SQL Data Compare 11 but lived with it.
Comments
Could you provide a script to set up a table and some dummy data to reproduce this?
There's nothing wrong with SQL Data Compare (well, we all knew that!), it's merge replication converting the contents of a sql_variant from datetime2 to nvarchar.