dimanche 4 octobre 2015

UpdateString not implemented by SQLite JDBC driver

I have a table PERSON with more than 5 millions rows and I need to update field NICKNAME on each one of them based on field NAME inside the same table.

ResultSet rs = statement.executeQuery("select NAME from PERSON");
  while(rs.next())
  {
    // some parsing function like:
    // Nickname = myparsingfunction(rs.getString("NAME"));
    rs.updateString( "NICKNAME", Nickname );
    rs.updateRow();
  }    

But I got this error: not implemented by SQLite JDBC driver

I'm using sqlite-jdbc-3.8.11.2.jar downloaded at http://ift.tt/1fOS9gr.

I know I could use SQL Query

statement.executeUpdate("update PERSONS set NICKNAME = Nickname where ID = Id");

But that would take forever and I understand updating recordset would be faster. So what options do I have to update the table on the fastest way? Any other driver available? Should I move out of Java?

Aucun commentaire:

Enregistrer un commentaire