package cz.moneta.test.dsl.util.task.retail.cards.constants;

public class CreditCardSQL {

    public static final String FIND_ONBOARDED_CARDS_BY_RC =
            "SELECT IP.RC_NUM AS RC,\n" +
                    "SUBSTR(CI.SRC_ID, -16, 19) AS CISLO_KARTY,\n" +
                    "( CI.INS_DT ) AS DATUM_ZALOZENI\n" +
                    "FROM ODS_L1_OWNER.CARD_INST CI\n" +
                    "INNER JOIN ODS_L1_OWNER.PROD_INST_PT_ROLE PI\n" +
                    "ON CI.PROD_INST_KEY = PI.PROD_INST_KEY\n" +
                    "INNER JOIN ODS_L1_OWNER.INST_PT IP\n" +
                    "ON IP.INST_PT_KEY = PI.INST_PT_KEY\n" +
                    "WHERE IP.RC_NUM IN ('ID_NUMBER')\n" +
                    "order by CI.INS_DT desc";

    public static final String FIND_CARD_BLOCK_CODE_BY_CARD_NUMBER =
            "SELECT card_inst.src_id AS card_num,\n" +
                    "card_inst.block_code AS card_block_code\n" +
                    "FROM ods_l1_owner.card_inst\n" +
                    "WHERE card_inst.src_id LIKE '%CARD_NUMBER%'";

}
