/**Begin D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_RIM_BATCH_DEDUCT', 'T_RIM_BATCH_DEDUCT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_BATCHDEDUCT_ORG') CREATE INDEX IDX_RIM_BATCHDEDUCT_ORG ON T_RIM_BATCH_DEDUCT ( FORG );


 EXEC P_ALTERPK 'PK_T_RIM_BATCHDEDUCT_USERORG', 'T_RIM_BATCHDEDUCT_USERORG', 'FENTRYID', '0';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_BATCHDE_TAXNO') CREATE INDEX IDX_RIM_BATCHDE_TAXNO ON T_RIM_BATCHDEDUCT_USERORG ( FTAXPAYER_TAX_NO );



/**End D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
