| | |
| | | " from information_schema.tables " +
|
| | | " where table_schema='db_pwrdev_data_history' " +
|
| | | " AND TABLE_NAME like 'tb_pwrdev_historydata_%' " +
|
| | | " AND UPDATE_TIME <= '"+Com.getDateTimeFormat(deldate, Com.DTF_YMDhms)+"';" ;
|
| | | " AND CREATE_TIME <= '"+Com.getDateTimeFormat(deldate, Com.DTF_YMDhms)+"';" ;
|
| | |
|
| | | String sql_delete_strs = " DROP TABLE IF EXISTS ";
|
| | |
|
| | | Sql_Mysql sql = new Sql_Mysql(conn_pool.getConn());
|
| | | ResultSet res = null;
|
| | | int count = 0;
|
| | | res = sql.sqlMysqlQuery(sql_select_strs);
|
| | | res = sql.sqlMysqlTotalQuery(sql_select_strs);
|
| | | try {
|
| | | while(res.next()) {
|
| | | if(count > 0) {
|
| | |
| | | count++;
|
| | | }
|
| | | if(count > 0) {
|
| | | sql.sqlMysqlExecute(sql_delete_strs);
|
| | | sql.sqlMysqlTotalExecute(sql_delete_strs);
|
| | | }
|
| | |
|
| | | res.close();
|
| | |
| | |
|
| | | Sql_Mysql sql = new Sql_Mysql(pool.getConn());
|
| | |
|
| | | //System.out.println(sql_str);
|
| | |
|
| | | try {
|
| | | System.out.println(sql_str);
|
| | | sql.sqlMysqlExecute(sql_str);
|
| | | } catch (SQLException e) {
|
| | | sql.logger.error(e.toString(), e);
|