praticamente quello che vorrei fare è questo
lo scrivo in pseudocodice/pseudojava/pseudosql
codice:
sql = select id,sum(quantita) from tabella where data = ? or data = ? group by id
params = { data1,data2}
cursore = eseguiquery(sql)
while cursore.movetonext() { // ci sono una media di 1000 tuple
sql2 = update tabella set quantita = cursore.getint(1) where id = cursore.getint(0) and data = data1
eseguiquery(sql2)
}
fare una cosa del genere è lentissima poichè significa fare 1000 query...
non è proprio l'ideale...