1 Reply Latest reply on Jul 17, 2018 11:36 AM by Silvi Agarwal

    Unable to Extract data

    Silvi Agarwal

      Hi all,


      I am trying to create extract of database and it's throwing me an error. Below is the query that is showing in error:


      SELECT COUNT(DISTINCT "Extract"."enc_member_ssn1") AS "TEMP(Calculation_1991203100114981)(1199677599)(0)",

        COUNT(DISTINCT (CASE WHEN (((CASE WHEN ("Extract"."relationship_id1" = 1) THEN 'SS' WHEN ("Extract"."relationship_id1" = 2) THEN 'SP' ELSE 'DD' END) = 'SP') AND ("Extract"."customField5" = 'Y')) THEN "Extract"."enc_member_ssn1" ELSE null::text END)) AS "TEMP(Calculation_1991203100114981)(1645342229)(0)",

        COUNT(DISTINCT "Extract"."participant_id") AS "ctd:participant_id:ok",

        "Extract"."entity" AS "entity",

        "Extract"."hospital_name" AS "hospital_name"

      FROM "Extract"."Extract" "Extract"

      WHERE (((CASE WHEN (("Extract"."updated_at" >= (DATE '2014-04-24')) AND ("Extract"."updated_at" <= (DATE '2015-04-23'))) THEN '2018' ELSE null::int END) = 2019) AND (NOT ("Extract"."enc_member_ssn1" IN ('000000000', '999999999'))))

      GROUP BY 4,




      Any help is much appreciated,