/**Begin D:\pdm\PDM_UPGRADE\pdm_new\RIM_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_REIM_VOUCH_RELATION_EX') CREATE INDEX IDX_REIM_VOUCH_RELATION_EX ON T_RIM_REIM_VOUCH_RELATION ( FREIM_EXPENSE_ID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_REIM_VOUCH_RELATION_VO') CREATE INDEX IDX_REIM_VOUCH_RELATION_VO ON T_RIM_REIM_VOUCH_RELATION ( FVOUCH_VOUCHID );

 EXEC P_ALTERPK 'PK_T_RIM_CHECK_RESULT', 'T_RIM_CHECK_RESULT', 'FID', '0';

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



/**End D:\pdm\PDM_UPGRADE\pdm_new\RIM_constraint.sql **/
