title: Using Java to populate a specific column in an SQL table
body: <p>Essentially, I have a methods that manipulates data taken from a table to create a new object "ZExpert." ZExpert has parameters int id, int domain, and double ZExpert. I have added a column to the table I took the data from called "Z_Expert_Score." </p>
  
  <p>I want to put the double ZExpert score from the object in the column Z_Expert_Score, in the row where "Customer_Expert_ID"=domain and "Customer_ID"=id. Here is my attempt</p>
  
  <pre><code>ZExpert[] allZExpert = scrCalc.getzExpertAll();
  
  for(int i = 0; i &lt; allZExpert.length; i++) {
    ZExpert currentZExpert = allZExpert[i]; 
    int id = currentZExpert.getId();
    int domain = currentZExpert.getDomain();
    double ZExpertScore = currentZExpert.getzExpert();
  
    Statement statement = conn.createStatement();
    statement.executeUpdate ("INSERT INTO CONSUMER_EXPERT_ID 
                               where CONSUMER_EXPERT_ID="+domain+"AND CONSUMER_ID="+id+ "(Z_EXPERT_SCORE) VALUES("+ZExpertScore+")");
  }
  </code></pre>
  
  <p>Thanks in advance!</p>