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

SQL NUMERIC(7,6) doesn't translate well #691

Closed schuemie closed 1 year ago

schuemie commented 1 year ago

In this file there's the following SQL:

CAST(CAST(1.0*op.record_count/dt.record_count AS NUMERIC(7,6)) AS VARCHAR(255)) 

However, some database platforms don't have the equivalent of NUMERIC(7,6) (see https://github.com/OHDSI/SqlRender/issues/309). Since I think the goal here is to simply round a number, maybe use the ROUND() function instead?

AnthonyMolinaro commented 1 year ago

@schuemie I forget why I coded it this way in the first place, but this was an issue that was previously opened and I thought I cleaned them all up. Looks like I missed one. : )

Good catch, thanks Martijn!