OHDSI Home | Forums | Wiki | Github

Error in Achilles Call

Hi there,

So i’ve set up a CDM schema containing the CDM and Vocab tables, and created another schema called OHDSI to hold the results generated from Achilles in PostgreSQL. I’m currently running the Achilles call to get the achilles_results tables etc, but encountered some errors.

|=====================================================================================| 100%
Executing SQL took 4.09 secs
  |                                                                                     |   0%Error: Error executing SQL:
org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
  Position: 389

The error report generated is:

DBMS:
postgresql

Error:
org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
  Position: 389

SQL:
CREATE TEMP TABLE s_tmpach_1813

AS
SELECT
1813 as analysis_id, 
cast(null as varchar(255)) as stratum_1, cast(null as varchar(255)) as stratum_2, cast(null as varchar(255)) as stratum_3, cast(null as varchar(255)) as stratum_4, cast(null as varchar(255)) as stratum_5,
COUNT(m.PERSON_ID) as count_value

FROM
cdm.measurement m
	left join cdm.visit_occurrence vo on m.visit_occurrence_id = vo.visit_occurrence_id
where m.visit_occurrence_id is not null
	and vo.visit_occurrence_id is null

Would appreciate any advice on this issue, thanks much!

Regards,
Hui Xing

the only = operator I see is comparing the visit_occurrence visit_occurrence_id to the measurement’s visit_occurrence id. Is it possible visit_occurrence_id is an int in one column but a varchar in the other?

@hui_xing_tan Thank you. Please open an issue here.

@t_abdul_basser @Chris_Knoll

You are right, the visit_occurence_id was a varchar in the measurement table but an int in the visit_occurrence table Thanks (:

t