/**Begin C:\Users\RD_jerry_wz_wang\Desktop\PDM_UPGRADE\pdm1\MDS_constraint.sql **/
EXEC P_ALTERPK 'PK_T_MDS_SETOFFFIELDSET_L', 'T_MDS_SETOFFFIELDSET_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_MDS_SETOFFFIELDSET_E_L', 'T_MDS_SETOFFFIELDSET_E_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_MDS_SETOFFFIELDSET_E', 'T_MDS_SETOFFFIELDSET_E', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_MDS_SETOFFFIELDSET', 'T_MDS_SETOFFFIELDSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_SETOFFFIELDSET_CC') CREATE INDEX IDX_MDS_SETOFFFIELDSET_CC ON T_MDS_SETOFFFIELDSET ( FEFFECT );



/**End C:\Users\RD_jerry_wz_wang\Desktop\PDM_UPGRADE\pdm1\MDS_constraint.sql **/
