/**Begin D:\pdm\PDM_UPGRADE\pdm_new\RIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_RIM_EXPENSE_LOG', 'T_RIM_EXPENSE_LOG', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_EXPENSE_LOG') CREATE INDEX IDX_RIM_EXPENSE_LOG ON T_RIM_EXPENSE_LOG ( FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_EXPENSE_LOG_TIME') CREATE INDEX IDX_RIM_EXPENSE_LOG_TIME ON T_RIM_EXPENSE_LOG ( FCREATE_TIME ,FLOG_TYPE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_EXPENSE_LOG_ID') CREATE  CLUSTERED INDEX IDX_RIM_EXPENSE_LOG_ID ON T_RIM_EXPENSE_LOG ( FBILLID );


 EXEC P_ALTERPK 'PK_RIM_DOWNLOAD_FILE', 'T_RIM_DOWNLOAD_FILE', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWNLOAD_FILE') CREATE  CLUSTERED INDEX IDX_RIM_DOWNLOAD_FILE ON T_RIM_DOWNLOAD_FILE ( FFILEID );



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