Quantcast
Channel: DHIS2 Community - Latest topics
Viewing all articles
Browse latest Browse all 1519

MetaData Sync Issue

$
0
0

Hi All,

While performing metadata sync from one instance(2.40.4.1) to another(2.40.4.1), I am receiving below error

org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT count(instance) FROM ( SELECT TEI.uid AS instance, TEI.created AS created, TEI.lastupdated AS lastupdated, TEI.ou AS ou, TEI.ouname AS ouname, TET.uid AS te, TEI.inactive AS inactive, TEI.potentialduplicate AS potentialduplicate, TEI.deleted AS deleted FROM (SELECT DISTINCT TEI.trackedentityinstanceid, TEI.uid, TEI.created, TEI.lastupdated, TEI.inactive, TEI.trackedentitytypeid, TEI.potentialduplicate, TEI.deleted, OU.uid as ou, OU.name as ouname FROM trackedentityinstance TEI INNER JOIN program P ON P.trackedentitytypeid = TEI.trackedentitytypeid AND P.programid IN ()LEFT JOIN trackedentityprogramowner PO ON PO.trackedentityinstanceid = TEI.trackedentityinstanceid AND P.programid = PO.programid INNER JOIN organisationunit OU ON OU.organisationunitid = COALESCE(PO.organisationunitid, TEI.organisationunitid) where TEI.trackedentitytypeid in (215088) and TEI.lastupdated >= TEI.lastsynchronized AND TEI.lastupdated >= ‘1970-01-01T01:00:00.000’) TEI LEFT JOIN trackedentitytype TET ON TET.trackedentitytypeid = TEI.trackedentitytypeid ) teicount]; nested exception is org.postgresql.util.PSQLException: ERROR: syntax error at or near “)”

I could see data in Program and Tracked Entities table so I dont see a point of having P.programid IN (). Should there be something else I should also be looking at.

Help is highly appreciated

@dhis2-backend @dhis2-platform @dhis2-projects

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1519

Trending Articles