IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_PROVIDERRECORD_SETMID') CREATE INDEX IDX_MDS_PROVIDERRECORD_SETMID ON T_MDS_PROVIDERRECORD(FSETID,FMATERIEL);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_REQUESTRECORD_SETMID') CREATE INDEX IDX_MDS_REQUESTRECORD_SETMID ON T_MDS_REQUESTRECORD(FSETID,FMATERIEL);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_FNREPORT_SETMID') CREATE INDEX IDX_MDS_FNREPORT_SETMID ON T_MDS_FNREPORT(FSETID);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_FCDATADTLENT_FIDMID') CREATE INDEX IDX_MDS_FCDATADTLENT_FIDMID ON T_MDS_FCDATADTLENT(FID,FMATERIALID);