/**Begin D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_RIM_INPUT_TABLE', 'T_RIM_INPUT_TABLE', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INPUTTABLE_BATCH') CREATE  CLUSTERED INDEX IDX_RIM_INPUTTABLE_BATCH ON T_RIM_INPUT_TABLE ( FBATCH_NO );

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INPUTTABLE_CREATETIME') CREATE INDEX IDX_RIM_INPUTTABLE_CREATETIME ON T_RIM_INPUT_TABLE ( FCREATETIME );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INPUTTABLE_TAXNO') CREATE INDEX IDX_RIM_INPUTTABLE_TAXNO ON T_RIM_INPUT_TABLE ( FTAX_NO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INPUTTABLE_CODENO') CREATE INDEX IDX_RIM_INPUTTABLE_CODENO ON T_RIM_INPUT_TABLE ( FINVOICE_CODE ,FINVOICE_NO );



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