|
@@ -31,17 +31,18 @@ public class TaskInsert2Taos implements Runnable {
|
|
|
sql = sql.replaceFirst("INSERT INTO ", "CREATE TABLE IF NOT EXISTS ");
|
|
|
sql = sql.replaceAll("VALUES.+?\\) ", replace);
|
|
|
sql = sql.replace(",CREATE TABLE IF NOT EXISTS ;", "");*/
|
|
|
- sql = sql.replaceAll("\\) ", ");~INSERT INTO ");
|
|
|
+ /*sql = sql.replaceAll("\\) ", ");~INSERT INTO ");
|
|
|
sql = sql.replaceAll("VALUES", replace);
|
|
|
- sql = sql.replaceAll("~INSERT INTO ;", "");
|
|
|
- String ss = null;
|
|
|
+ sql = sql.replaceAll("~INSERT INTO ;", "");*/
|
|
|
+ String ss = sql.replace("VALUES", replace);
|
|
|
try {
|
|
|
Statement st = conn.createStatement();
|
|
|
- String[] split = sql.split("~");
|
|
|
+ /*String[] split = sql.split("~");
|
|
|
for (String s : split) {
|
|
|
ss = s;
|
|
|
st.executeUpdate(s);
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ st.executeUpdate(ss);
|
|
|
} catch (Exception ex) {
|
|
|
ex.printStackTrace();
|
|
|
log.error(ss);
|