Adding a value to a 'datetime' column caused an overflow.

  • I am receiving this error and I can't seem to fix it. Here is the snippet of code I am running.

    SELECTSUM(ade.network_price)[Cumulative_31_90_Days],

    b.Claim#

    FROMdbo.All_Data_Export ade JOIN #Benchmark b

    ON ade.claim# = b.Claim#

    WHEREinvoice_date BETWEEN DATEADD(dd,31,ade.DOI) AND DATEADD(dd,90,ade.DOI)

    GROUP BY b.Claim#

    Both Invoice_date and DOI are datetime data types. I appreciate any help. Thank you

  • Well, the only feasible way I can think that could occur is if you have a date value that's less than 90 days from the max for datetime (December 31, 9999). Select the max date from each of those columns to see...

  • That was it. Thank you very much.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply