OHDSI / Achilles

Automated Characterization of Health Information at Large-scale Longitudinal Evidence Systems (ACHILLES) - descriptive statistics about a OMOP CDM database
https://ohdsi.github.io/Achilles/
130 stars 121 forks source link

Analysis 1326.sql--COUNT(*) results in data type error #681

Open billsanto opened 2 years ago

billsanto commented 2 years ago

Describe the bug COUNT(*) produces the following error after about 10 minutes:

Msg 8115, Level 16, State 2, Line 2 Arithmetic overflow error converting expression to data type int. The statement has been terminated.

To Reproduce Steps to reproduce the behavior:

  1. Run analyses

    • OS: OS X
    • Achilles 1.7
    • DB: SQL Server 15
    • CDM: 5.3.1

I changed all the COUNT() functions to COUNT_BIG() as a workaround. See attached. 1326.txt