/**Begin D:\page\rim\pdm\20210726\RIM_constraint.sql **/
EXEC p_DropIdx 'IDX_RIM_DOWN_ACCOUNT2', 'T_RIM_DOWN_ACCOUNT';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_DOWN_ACCOUNT2') CREATE INDEX IDX_RIM_DOWN_ACCOUNT2 ON T_RIM_DOWN_ACCOUNT ( FSTATUS );

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

 EXEC P_ALTERPK 'PK_RIM_BLACK_LIST_DATA', 'T_RIM_BLACK_LIST_DATA', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_BLACK_LIST_DATA') CREATE  CLUSTERED INDEX IDX_RIM_BLACK_LIST_DATA ON T_RIM_BLACK_LIST_DATA ( FCOMPANY_NAME );


 EXEC P_ALTERPK 'PK_RIM_INV_WARNING_DATA', 'T_RIM_INV_WARNING_DATA', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INV_WARNING_DATA') CREATE  CLUSTERED INDEX IDX_RIM_INV_WARNING_DATA ON T_RIM_INV_WARNING_DATA ( FORG ,FDATA_PERIOD );



/**End D:\page\rim\pdm\20210726\RIM_constraint.sql **/
