Krzysztof wrote: > I have daemon on server which each day create new sqlite database. Client > application can download and present these databases. For example: User > want to see data from last week so client application download 7 > files. Advantage of this defragmentation is that it don't need to download > big files. Disadvantage is that create queries is tricky. So here is my > question. Is SQLite has some function for merging data? I'm wondering about > ATTACH DATABASE, but maybe there is a better way?
You can indeed use attached databases to merge data: ATTACH DATABASE 'day42.sqlite' AS 'day42'; INSERT INTO MyTable SELECT * FROM day42.MyTable; If the data does not have a timestamp, you'd have to add it: INSERT INTO MyTable(name, value, whatever, day) SELECT name, value, whatever, 42 FROM day42.MyTable; Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users