Problem with DATETIME2 as partition column

Apr 8, 2016 at 3:17 PM
Edited Apr 8, 2016 at 3:18 PM
I've got a table that has a ValidFrom column of type DATETIME2(3). When I try and run the ptf.PartitionTable I get the following error:
Msg 50000, Level 16, State 1, Procedure HandleError, Line 22
the column type is incompatible with the partition function
Everything works fine if I just change the type to DATETIME.
Is there something I'm missing?
This should be a valid type to use as partition column.

Any thoughts would be greatly appreciated.

Apr 11, 2016 at 1:20 PM
Hi Christos,

I guess that your partition function is created with data type DATETIME. The type specified when defining the partition function must be 100% identical to the type of the column you want to partition a table with. This is expected behavior .