SQL Error when using Date/Time  functions: Data access error: Cannot find either column "dbo" or the user-defined function or aggregate "dbo.AddDays", or the name is ambiguous..

Version 2

    Details

     

    When using the Date/Time functions for some of them it can cause a SQL Error to be displayed:


    An error message is displayed: Data access error: Cannot find either column "dbo" or the user-defined function or aggregate "dbo.AddDays", or the name is ambiguous..



     


    Resolution

    The issue is caused by the custom Date and Time functions that HEAT SM uses being missing in the database.  This will be corrected in the 2016.1.1 release.


    Attached to this Knowledge Article is a SQL Script that can be run against the database to create the missing Date/Time functions: DateTimeFns.sql

    Before running this script we advise that you take a backup of the database.