/**Begin D:\scm_code\PDM_UPGRADE_1.3\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm2\RIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_RIM_DOWNLOAD_CENTER', 'T_RIM_DOWNLOAD_CENTER', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWNLOAD_CENTER') CREATE  CLUSTERED INDEX IDX_RIM_DOWNLOAD_CENTER ON T_RIM_DOWNLOAD_CENTER ( FBILLNO );


 EXEC P_ALTERPK 'PK_RIM_DOWNLOAD_DETAIL', 'T_RIM_DOWNLOAD_DETAIL', 'FENTRYID', '0';

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


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INVOICE_UNCHECK_NO') CREATE INDEX IDX_RIM_INVOICE_UNCHECK_NO ON T_RIM_INVOICE_UNCHECK ( FSERIAL_NO );


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