darwin-eu / CodelistGenerator

Identifying relevant concepts from the OMOP CDM vocabularies
https://darwin-eu.github.io/CodelistGenerator/
Other
12 stars 8 forks source link

summariseCodeUse() #222

Open zcuccu opened 1 month ago

zcuccu commented 1 month ago

Error in summariseCodeUse() - conflict between "SQL_Latin1_General_CP1_CI_AS" and "SQL_Latin1_General_CP1_CI_AI" in UNION ALL operator.

To Reproduce codes <- getCandidateCodes(cdm = cdm, keywords = c("asthma", "eczema"), exclude = "occupation", domains = c("Condition", "Procedure", "Drug"), standardConcept = "Standard", searchInSynonyms = TRUE, searchNonStandard = FALSE, includeDescendants = TRUE, includeAncestor = FALSE)

event_count <- summariseCodeUse(list("cd" = codes$concept_id), cdm = cdm)

Screenshots ![Uploading image.png…](

summariseCodeUse

)

ODBC failed with error 42000 from [Microsoft][ODBC SQL Server Driver][SQL Server]. x Implicit conversion of varchar value to varchar cannot be performed because the collation of the value is unresolved due to a collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "SQL_Latin1_General_CP1_CI_AI" in UNION ALL operator.

zcuccu commented 1 month ago
summariseCodeUse
edward-burn commented 1 month ago

Hi @zcuccu, afraid I´m not sure what is going on here. Could you please try again with the latest 3.2.1 version on cran to see if you get the same error? If so, I will try to dig into this more

zcuccu commented 1 month ago

Hi @edward-burn have tested with version 3.2.1 and receive the same error. Could this be because the collation on our tempdb is SQL_Latin1_General_CP1_CI_AS and main database is SQL_Latin1_General_CP1_CI_AI?