/** 日志加索引 **/



 EXEC P_ALTERPK 'PK_BAL_BALANCELOG', 'T_BAL_BALANCELOG', 'FID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BAL_LOG_ST') CREATE INDEX IDX_BAL_LOG_ST ON T_BAL_BALANCELOG ( FSTART );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BAL_LOG_BN') CREATE INDEX IDX_BAL_LOG_BN ON T_BAL_BALANCELOG ( FBILLNAME );


 EXEC P_ALTERPK 'PK_BAL_BALANCELOGENTRY', 'T_BAL_BALANCELOGENTRY', 'FENTRYID', '1';
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BAL_LOG_E_FID') CREATE INDEX IDX_BAL_LOG_E_FID ON T_BAL_BALANCELOGENTRY ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BAL_LOG_E_FBNO') CREATE INDEX IDX_BAL_LOG_E_FBNO ON T_BAL_BALANCELOGENTRY ( FRULENO );


/** 日志加索引 **/
