/**Begin C:\Users\rd_zhixiong_w\Downloads\PDM_UPGRADE\PDM1\TM_constraint.sql **/
 EXEC P_ALTERPK 'PK_TM_SETTLEMENT_SETTING_L', 'T_TM_SETTLEMENT_SETTING_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TM_SETTLEMENT_SET_FOREX', 'T_TM_SETTLEMENT_SET_FOREX', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TM_SETTLEMENT_SET_RATE', 'T_TM_SETTLEMENT_SET_RATE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TM_SETTLEMENT_SET_STRUC', 'T_TM_SETTLEMENT_SET_STRUC', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TM_SETTLEMENT_SETTING', 'T_TM_SETTLEMENT_SETTING', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TM_SETTLEMENT_SETTING') CREATE INDEX IDX_TM_SETTLEMENT_SETTING ON T_TM_SETTLEMENT_SETTING ( FNUMBER ,FNAME );


 EXEC P_ALTERPK 'PK_TM_SETTLEMENT_SET_ORG', 'T_TM_SETTLEMENT_SET_ORG', 'FPKID', '1';

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



/**End C:\Users\rd_zhixiong_w\Downloads\PDM_UPGRADE\PDM1\TM_constraint.sql **/
