/**Begin D:\d_desk\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_SIM_RECYCLE_LOG', 'T_SIM_RECYCLE_LOG', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_RECYCLE_LOG') CREATE  CLUSTERED INDEX IDX_SIM_RECYCLE_LOG ON T_SIM_RECYCLE_LOG ( FTERMINAL ,FTERMINALNAME );


 EXEC P_ALTERPK 'PK_SIM_ROLLBACK_LOG', 'T_SIM_ROLLBACK_LOG', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_ROLLBACK_LOG') CREATE  CLUSTERED INDEX IDX_SIM_ROLLBACK_LOG ON T_SIM_ROLLBACK_LOG ( FEQINFO );


 EXEC P_ALTERPK 'PK_SIM_APPLY_RESULT', 'T_SIM_APPLY_RESULT', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_APPLY_RESULT') CREATE  CLUSTERED INDEX IDX_SIM_APPLY_RESULT ON T_SIM_APPLY_RESULT ( FID );


 EXEC p_AlterPK 'PK_SIM_INV_APPLY_LOG', 'T_SIM_INV_APPLY_LOG', 'fid', '0';
EXEC p_DropIdx 'IDX_SIM_INV_APPLY_LOG', 'T_SIM_INV_APPLY_LOG';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_INV_APPLY_LOG') CREATE  CLUSTERED INDEX IDX_SIM_INV_APPLY_LOG ON T_SIM_INV_APPLY_LOG ( FTAX );


/**End D:\d_desk\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_constraint.sql **/
