• I recently ran across this issue in one of my data conversions for a client. Same error but different symptoms. I was able to narrow the issue down to a specific concatenation of dateparts and then converting to a datetime as well as a specific join causing the problem on one of my queries.

    My issue was resolved by adding indexes on the join table.

    example:

    select convert(datetime, A.MO + '/' + A.DY + '/' A.YR)

    from A

    join B on A.id = b.id

    left join C on A.id = C.id

    AND a.id2 = C.id2

    In the example above there weren't indexes on table C. As soon as I added them on id and id2 the error went away. Hope this inspires you to look a different direction and resolve your issue.

    Remember this when a developer tells you it will just be temporary. Temporary = Permanent.