Home Forums SQL Server 2012 SQL 2012 - General The view contains a convert that is imprecise or non-deterministic error when trying to create a clustered index on a view RE: The view contains a convert that is imprecise or non-deterministic error when trying to create a clustered index on a view

  • decimal(10,0) and datetime are not really the same thing...

    The error message is clear: it says that you need to add a computed and persisted column to the base table which holds the conversion. That is:

    ALTER TABLE tbl ADD INDATE AS (...) PERSISTED

    As for how to convert that decimal(10,0) value to datetime, that depends on what is in that column.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]