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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INV_OVERSEA') CREATE UNIQUE  CLUSTERED INDEX IDX_RIM_INV_OVERSEA ON T_RIM_INV_OVERSEA ( FSERIAL_NO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INV_OVERSEA_NO') CREATE INDEX IDX_RIM_INV_OVERSEA_NO ON T_RIM_INV_OVERSEA ( FINVOICE_NO );


 EXEC P_ALTERPK 'PK_RIM_INVOICE_FILE_HIS', 'T_RIM_INVOICE_FILE_HIS', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INVOICE_FILE_HIS') CREATE  CLUSTERED INDEX IDX_RIM_INVOICE_FILE_HIS ON T_RIM_INVOICE_FILE_HIS ( FSERIAL_NO );



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