
 EXEC P_ALTERPK 'PK_MSPLAN_REPORTEXTCOLUMN', 'T_MSPLAN_REPORTEXTCOLUMN', 'FENTRYID', '1';
 EXEC P_ALTERPK 'PK_MSPLAN_REPORTEXTMODEL_L', 'T_MSPLAN_REPORTEXTMODEL_L', 'FPKID', '1';
 EXEC P_ALTERPK 'PK_MSPLAN_REPORTEXTENTITY', 'T_MSPLAN_REPORTEXTENTITY', 'FENTRYID', '1';
 EXEC P_ALTERPK 'PK_MSPLAN_REPORTEXTMODEL', 'T_MSPLAN_REPORTEXTMODEL', 'FID', '1';
 EXEC P_ALTERPK 'PK_MSPLAN_REPORTEXTCOLUMN_L', 'T_MSPLAN_REPORTEXTCOLUMN_L', 'FPKID', '1';
 EXEC P_ALTERPK 'PK_MSPLAN_REPORTEXTMATCH', 'T_MSPLAN_REPORTEXTMATCH', 'FENTRYID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REPORTEXTMODEL_NUM')   
CREATE INDEX IDX_MSPLAN_REPORTEXTMODEL_NUM ON T_MSPLAN_REPORTEXTMODEL  (FNUMBER);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REPORTEXTCOLUMN_FK')   
CREATE INDEX IDX_MSPLAN_REPORTEXTCOLUMN_FK ON T_MSPLAN_REPORTEXTCOLUMN  (FID);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REPORTEXTMODEL_L_0')   
CREATE INDEX IDX_MSPLAN_REPORTEXTMODEL_L_0 ON T_MSPLAN_REPORTEXTMODEL_L  (FID, FLOCALEID);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REPORTEXTENTITY_FK')   
CREATE INDEX IDX_MSPLAN_REPORTEXTENTITY_FK ON T_MSPLAN_REPORTEXTENTITY  (FID);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REPORTEXTCOLUMN_L_0')   
CREATE INDEX IDX_MSPLAN_REPORTEXTCOLUMN_L_0 ON T_MSPLAN_REPORTEXTCOLUMN_L  (FENTRYID, FLOCALEID);

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_REPORTEXTMATCH_FK')   
CREATE INDEX IDX_MSPLAN_REPORTEXTMATCH_FK ON T_MSPLAN_REPORTEXTMATCH  (FID);
