Re: [sqlite] replace many rows with one

2014-12-11 Thread Simon Slavin
On 10 Dec 2014, at 3:40pm, RSmith wrote: > INSERT INTO s2merged SELECT a, b, sum(theCount) FROM s2 GROUP BY a,b; Thanks to Martin, Hick and R for this solution. It was just what I was looking for. > Not sure if your theCount field already contains totals or if it just has > 1's... how did

Re: [sqlite] replace many rows with one

2014-12-10 Thread RSmith
On 2014/12/10 13:39, Simon Slavin wrote: Dear folks, A little SQL question for you. The database file concerned is purely for data manipulation at the moment. I can do anything I like to it, even at the schema level, without inconveniencing anyone. I have a TABLE with about 300 million (si

Re: [sqlite] replace many rows with one

2014-12-10 Thread Hick Gunter
Both, I guess Insert into ... select a,b,sum(theCount) group by a,b; -Ursprüngliche Nachricht- Von: Simon Slavin [mailto:slav...@bigfraud.org] Gesendet: Mittwoch, 10. Dezember 2014 12:39 An: General Discussion of SQLite Database Betreff: [sqlite] replace many rows with one Dear folks

Re: [sqlite] replace many rows with one

2014-12-10 Thread Martin Engelschalk
Hi Simon, Am 10.12.2014 12:39, schrieb Simon Slavin: Dear folks, A little SQL question for you. The database file concerned is purely for data manipulation at the moment. I can do anything I like to it, even at the schema level, without inconveniencing anyone. I have a TABLE with about 300

[sqlite] replace many rows with one

2014-12-10 Thread Simon Slavin
Dear folks, A little SQL question for you. The database file concerned is purely for data manipulation at the moment. I can do anything I like to it, even at the schema level, without inconveniencing anyone. I have a TABLE with about 300 million (sic.) entries in it, as follows: CREATE TABLE